Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set timer to fire on every 15 minute interval
Message
From
14/01/2009 11:25:06
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01373570
Message ID:
01373590
Views:
23
I suspect that the line of code inside the IF is never executed. The only time it will be executed is if the Paint event is executed at HH:00, HH:15, HH:30 or HH:45, which is less likely.

Why do you need to set the Timer in the Paint event? Shouldn`t this code go into Init or something similar?

I would calculate the difference in seconds between now and the next 15 minutes increment in the Init and set the Timer Interval property to that value. When the Timer fire, I would the execute the line of code you have inside the Fire event so that it would now fire next in 15 minutes.

>need to set a timer to fire on every 15 minute interval. (ie: 1:00 , 1:15, 1:30 etc.)
>It seems the paint event fires every 1 second and the following code is in the
>paint event of the form
>
>
>IF EMPTY(this.timercontrol.interval) and INT(MINUTE(datetime())/15 )=MINUTE(datetime)/15
>      this.timercontrol.interval = 15*60*1000
>ENDIF
>
>
>Question I have is there any issues to be concerned about with setting the timer from the Paint event of the form?
Previous
Reply
Map
View

Click here to load this message in the networking platform