Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop processing
Message
From
26/09/2006 21:22:33
 
 
To
26/09/2006 09:17:35
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
Miscellaneous
Thread ID:
01157160
Message ID:
01157384
Views:
15
>>A form has a checkbox that says: "Stop processing".
>>
>>The form has timers that run code.
>>
>>The problem is that I can only get access to the checkbox (to check it) when there is a gap. That is when the code has stopped running and the next timer event has not yet started.
>>
>>I would like to be able to "Stop processing" at any time. Any thoughts on how this can be accomplished?
>
>A DOEVENTS at certain points in the timer code? It'll probably make it a tad slower, but should give the code a chance to process user input.

Thanks for the tip on using DOEVENTS.

I read up on this in Hackers and they have a tip on combining it with MDOWN(). I implemented this.

It works OK in a test form with a loop (for kk = 1 to 10000), where one can test for it at every iteration. However, where there is a lot of code being run in the loop, it doesn't work that well, as there is not enough time for the DOEVENTS to register the user's mouse click.

I guess I need to do it after every line of code.

What do you think of using ON KEY LABEL to stop processing?

Cyril
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform