Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cancel
Message
De
07/07/2000 07:07:36
Walter Meester
HoogkarspelPays-Bas
 
 
À
07/07/2000 05:37:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Cancel
Divers
Thread ID:
00389352
Message ID:
00389373
Vues:
17
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,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform