Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing the form.
Message
De
16/05/1997 14:28:03
 
 
À
16/05/1997 13:56:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00032608
Message ID:
00032619
Vues:
34
>When the user clicks to close the active form, I would like to prompt to save changes if any have been made to the current record. My close button is already aware of changes, and deals with the situation accordingly, but can I prevent the form from closing after the user clicks the 'x', if he/she selects cancel from the resulting messagebox?
>Restated: once the user clicks to close the form, can I negate that action?


The 'X' click calls the QueryUnload event on your form. In your method that closes the form return false if you do not want to close the form. Then put this code in the QueryUnload event.

IF NOT { call close method here}
NODEFAULT
ENDIF

HTH
GeneS
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform