Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interrupting SCAN / ENDSCAN
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01118177
Message ID:
01118197
Vues:
28
>>>
>>>But the =messagebox() never sees the action. What do you suggest?
>>>
>>>Thank you.
>>
>>Try
>>
>>on escape plStop = messagebox("Cancel procedure",36,"Cancel?") = 7
>>
>>Also make this variable private. I use this code every time...
>
>Something is not working for me. I did change the variable to private and still to no avail. I will keep trying different things.
>
>Thank you for your help.

From my old code:
* support user Escapes for interrupting the main loop
PrevOnEsc = on('escape')				&& save previous Escape handler
PrevEscape = set('escape')				&& previous Escape enablement state
Set escape on							&& enable escape handling
plHalt = .f.							&& allow loop to run until this flag is toggled
On escape plHalt = .t.					&& force immediate termination if user escapes
Scan  && AND stnum > 0 AND UPPER(street)<> "ZZZ" && Should have indexes on SZipped, StNum, upper(street)
	If m.plHalt and messagebox('Do you want to stop Situs Zipping process?',36,'Stop Zipping')=6
		Exit
	Else
		plHalt = .f.
	Endif
works fine.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform