Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel
Message
From
07/07/2000 07:07:36
Walter Meester
HoogkarspelNetherlands
 
 
To
07/07/2000 05:37:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Cancel
Miscellaneous
Thread ID:
00389352
Message ID:
00389373
Views:
16
Hi Kevin and Nigel,

Just finished my solution to this problem:

-Just put a button on your form, called Cancel
-In the clickEvent of the form: THISFORM.CancelProcess = .T.
-In your processloop you must check for THISFORM.CancelProcess if it should be canceled
-Just before the checking:
	IF MDOWN() OR CHRSAW()
		DOEVENTS
	ENDIF
Whenever a key is pressed or a mouse is clicked, a DOEVENTS is executed. When the cancel button is clicked THISFORM.CancelProcess is set to .T.

The advantage of this approach is that the DOEVENTS is only executed when there are events to be executed and doesn't take precious time (DOEVENTS is a quite slow command, when there is nothing to process).


HTH

Walter,
Previous
Reply
Map
View

Click here to load this message in the networking platform