VB6.0 need help

Discussion in 'Programmer's Corner' started by ericyeoh, Mar 17, 2011.

  1. ericyeoh

    Thread Starter Active Member

    Aug 2, 2009
    58
    0
    Hi,

    Any 1 know how to write a VB6.0 code to call a function after few minutes?
    Besides, the program must not disturb the other functions at the same time the time function is also working.
     
  2. lightingman

    Senior Member

    Apr 19, 2007
    374
    22
    Hi.

    You could read the time from the PC clock and store it, Then have your program watch the clock at a certain point in the program. When it reaches the pre-set time, "do your code"...


    Daniel.
     
  3. DumboFixer

    Active Member

    Feb 10, 2009
    219
    34
    How about using the "Timer" object ? It'll call your handler when it times out.
     
    ericyeoh likes this.
  4. Dah_Big_Dog

    New Member

    Mar 23, 2011
    1
    1
    DumboFixer has the right idea. You can place any number of Timer objects on a form. The interval can be set at design time or you can modify it during execution. When the interrupt occurs, do whatever it is you need to do. If you are concerned that the task to be performed may span a timer interrupt, disable that Timer upon entering the Timer interrupt routine. That will eliminate the possibility of a continuous loop.
     
    ericyeoh likes this.
Loading...