Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Process interruption
Message
 
 
To
27/06/2000 10:14:44
Leonid Kizelshteyn
Boston Medical Software, Llc
Massachusetts, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00385037
Message ID:
00385125
Views:
9
>Hi,All,
>I've got an interesting problem. I have a form with multiple buttons to start different things. One of these buttons starts a very lengthy process, progress of which I can monitor on a form (using some common ActiveX controls such as ProgressBar). It all works fine, until I've got a request to make a "Pause" button to suspend that process. My first reaction was to create a "PAUSE" button and put "pause"-related code into Click event. It turns out that the system processed that event after the long process finishes.
>My question is - is it any common methods to pause long process invoked from the form?

There is nothing that will jump right in and say stop but you can program around this. You may be able to add some wait states by adding a DOEVENTS command throughout the process. This will let Windows process the queued up requests like your Pause button.

The Pause button could set a variable of property and the process could check that variable to see if it needs to stop.

Adding the DOEVENTS may significantly increase the length of the process. VFP now has to periodically stop and check to see if there are any events to process.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform