Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop Process
Message
From
09/11/1999 17:48:26
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00289304
Message ID:
00289334
Views:
30
>>How can I do to stop a process pressing the stop button in a form.
>>Ex. I execute a SQL statement and if I press the stop button, the process must terminate inmideatly.
>>
>
>The problem is that you can't; VFP will not interrupt an atomic line of code for a UI event process to occur, and in many cases, will not recognize the event until the current procedure or method changes. You'd have to call a UDF with your SQL statement and force a DOEVENTS() to make it reliably interruptible.

Ed,
Please elaborate on your suggestion. I've been looking for ways to interrupt processes for years. Since we lost the ability to basically stop any process using the escape key in Fox DOS 2.6. Now if I realize the error of my ways in a command that is taking too long, I either have to wait it out or kill the VFP task. Neither choice is very good.
What would you put in the UDF and where would you execute DOEVENTS()?
Thanks,
-Dore
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform