Re: The best way to yield processor to other users for long-runnin

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Paul fpvt2 (Paulfpvt2_at_discussions.microsoft.com)
Date: 01/14/05


Date: Thu, 13 Jan 2005 19:59:01 -0800

Hi Mike, Larry or Tony,
I have 1 more question.
In my ActiveX exe, at the end of the processing in Timer_timer event, do I
want to put the "End" statement so that it will kill the ActiveX exe after
that ? If I don't put the "End" statement, the ActiveX exe stays in the task
manager.

Thanks a lot.

"Mike D Sutton" wrote:

> > Did you mean in my ACtiveX exe put a timer with an interval of 1, and call
> > that timer from my application ?
> > Then the timer in the ActiveX exe calls the method GetSendData, which
> > disable the timer and does the processing ?
> > Will it get out of the method while it is still processing even though I
> > disable the timer here ?
>
> From what I remember you have a timer control in the ActiveX EXE which defaults to being disabled, then have a method within the
> application that takes any initialisation data for the routine and kicks off the timer, this method is called from the main
> application. The timer then executes within the application and does whatever it's required to do (think of the Tick() event
> handler as a Sub Main() for the 'thread' if you like, whatever needs doing in the application gets executed within that subroutine.)
> If anyone knows differently then please feel free to jump in here, since I'm just going from what I've seen in a few examples, I've
> never used the technique myself.
> Hope this helps,
>
> Mike
>
>
> - Microsoft Visual Basic MVP -
> E-Mail: EDais@mvps.org
> WWW: http://EDais.mvps.org/
>
>
>



Relevant Pages

  • Re: The best way to yield processor to other users for long-runnin
    ... What is IIRC? ... the ActiveX EXE, why in my case it does not return from the ActiveX EXE to ... What did you mean by Tickevent handler of the timer? ... (this means my application receives a request from a client). ...
    (microsoft.public.vb.general.discussion)
  • Re: Threads in Visual Basic?
    ... The important thing about that example Dag is that the ActiveX EXE thread ... the caller, as you suggested. ... I'd like the data to load in the background while they log in. ... The best I could think of would be to use a timer and a status flag to ...
    (comp.lang.basic.visual.misc)
  • Re: The best way to yield processor to other users for long-runnin
    ... Did you mean in my ACtiveX exe put a timer with an interval of 1, ... By simply setting up a timer and getting out of the method, control is returned back to whatever called it ... > processing the request leaving your main application free to respond to user input or other requests. ...
    (microsoft.public.vb.general.discussion)
  • Re: Problem w/ SetTimer callback
    ... or it's queue is being flooded with other ... higher priority messages. ... for the timer to expire. ... the ActiveX EXE is mostly idle (or at least that's what I ...
    (microsoft.public.vb.winapi)
  • Re: The best way to yield processor to other users for long-runnin
    ... >application that takes any initialisation data for the routine and kicks off the timer ... Did you mean have a method within the ActiveX exe? ... Public Sub process() ... Dim sCnt As String ...
    (microsoft.public.vb.general.discussion)