Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Long Process Interruption
Message
From
20/01/2001 03:47:33
Walter Meester
HoogkarspelNetherlands
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00465868
Message ID:
00466127
Views:
25
Hi martin/ken

>Somewhere in the middle of your loop, you have to issue the DOEVENTS command. This forces the pending Windows events to be evaluated.
>
>Note, anyway, that this can slown down your process. I remember having read a smart way to avoid the DOEVENTS latetly around here. Maybe someone else remember how exactly works.

It could have been my Fast-doevents solution:
IF MDOWN() OR CHRSAW()
	DOEVENTS
ENDIF
If you have this code somewhere in your process loop, the click event of the "cancel" button is processed when you either click it or activate it by keyboard. Note: Now you can even move the processform like you could with many busy forms in other windows programs. It even allows you to other things while in the process (sort of limited multitasking within VFP).


Walter,

>>I'm writing a complicated process program and am not sure how to implement a user interrupt mechanism.
>>
>>This is a long process, so I have a form that will display status messages. After the needed setup, there's a READ EVENTS command. Then, the form has a "Start Process" button to get things going. Once started, the legend changes to "Cancel" and it's Cancel property set to .T. (so that Esc will activate it).
>< snip... >
Previous
Reply
Map
View

Click here to load this message in the networking platform