Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timers and loops
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00431853
Message ID:
00431951
Views:
13
>>How do I interrupt a timer event and/or loop running in a form, by using a command button?
>
>You can stop a timer event from firing by setting it's Interval to zero. The loop will require more work - not sure if you can use ESCape, I would normally doing it by checking INKEY() inside the loop.
>
>Hope this helps.

Hi Houston,

I found, that InKey in loops slow down the process.
I use this technique:
save escape settings in local variables
private lStop
lStop=.f.
set escape on
on escape lStop=.t.
scan
  if lStop
     exit
  endif
  ** Some work + displaying termometr
endscan
restore old escape settings
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform