Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programing the red X at the top of the form
Message
De
03/11/2013 14:07:36
 
 
À
03/11/2013 13:20:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01587193
Message ID:
01587197
Vues:
85
some of our users still want to be able hit the red x at the top of the form. Therefore
I need a way to program the red x to set m0flag to 'quit' before it releases the form. I can't use the lost focus,
or destroy event buttons because when the Save button releases the form that event is activated and the
loop is exited.

I only want to exit the loop if the x is clicked.


Check out the form's QueryUnload() method - it fires whenever the user clicks on the form's close button (the red X in the upper right hand corner). You could call a method from that method to ask the user if he or she wants to save changes before exiting and then take appropriate action. If you do not want the form to close, just issue as NODEFAULT in the QueryUnload() method.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform