Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Long Process Interruption
Message
De
20/01/2001 03:47:33
Walter Meester
HoogkarspelPays-Bas
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00465868
Message ID:
00466127
Vues:
23
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... >
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform