Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer events
Message
From
22/11/2001 01:05:24
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00584801
Message ID:
00584814
Views:
23
>>How do I stop the timer firing while in a timer event?
>>Lets say I have a timer, tim1, on a form.
>>If the first line of the tim1.timer() event is
>>this.enabled= .F.
>>shouldn't that stop the timer firing again.
>>Yet if I debug and step through the code, the timer keeps firing.
>>If I put
>>this.interval= 0
>>in the first line the debugger stops and looses its place.
>>I'm sure I used to be able to do this somehow??
>>
>
>>Also, if my timer() code takes 2 seconds to run and the interval is set to 500 milliseconds, the timer seems to re-fire whilst in the middle of the code execution. Should that be?
>
>It should. It is recommended therefore to reset the timer.interval to 0 at the beginning of your timer() code then re-start it after.

Thanks Jess, I think i have a base class that does that. I would have thought that setting .enabled to .F. would have the same effect but it doesn't seem to in my code.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform