Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: chaim dudi
  Where is chaim dudi?
 Jerusalem
 South Carolina - Israel
 chaim dudi
 To: Ammar Hadi
  Where is Ammar Hadi?
 Al-Samawah
 Iraq
 Ammar Hadi
 Tags
Subject: RE: timer status
Thread ID: 248900 Message ID: 248940 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Friday, December 25, 2009 11:20:24 AM         
   


Thank you
> > Hi,
> >
> >
> > How can I know when the timer plan to run next time?
> >
> > Tnx
>
> Hello.
>
> 1- You need to have a custom property in your form or your timer class or a variable where you will save the datetime value of the next timer event firing. Here I supposed that it is a form custom property named: next_time.
>
> 2- To save the next time the timer will fire, use this code:
>
>
> thisform.next_time=DATETIME()+THIS.interval/1000
> 

>
> THIS refers to the timer. Put this code in the init event of the timer and in the timer event of the timer and in the code that will change the interval value (or in an assign method for more professional look, but be sure to replace THIS with the object reference to the timer if you are putting the code out of it).
>
> Note: this deals with seconds .. if you are concerned with milliseconds .. you may need a bit more complex work.
>
> HTH
>
> Ammar Hadi ................IRAQ
>
> My Foxite Weblog
>
> The Most Beautiful View ... is the one I Share with You.
> --------------------------------------

ENTIRE THREAD

timer status Posted by chaim dudi @ 12/24/2009 2:49:26 PM
RE: timer status Posted by ho me @ 12/24/2009 3:53:31 PM
RE: timer status Posted by chaim dudi @ 12/24/2009 4:05:04 PM
RE: timer status Posted by Koen Piller @ 12/24/2009 4:47:37 PM
RE: timer status Posted by Ammar Hadi @ 12/24/2009 5:22:39 PM
RE: timer status Posted by chaim dudi @ 12/25/2009 11:20:24 AM