Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping the exitting of a form
Message
 
À
23/08/1999 18:33:48
Ronald Suen
Epic Solutions Inc.
Edmonton, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00256846
Message ID:
00256853
Vues:
16
>I wish to trap the exitting of the form so that I can prompt the user to confirm ending the transaction. If they select "no", I do not want to close the form. Note that I want this message to appear if they click the close button (in the top right corner of the window) or if they click a "cancel" button that I've placed on the form. How do I do this?
>
>Thanks,

Ronald, you should use form QueryUnload to place the confirm code.
Issue NODEFAULT and return .F. from this method if the user chooses "No". In your Cancel button you need to call the form.QueryUnload() method before you do Release() the form.
It may look like:

*cmdCancel.Click()
IF thisform.QueryUnload()
*... do something
thisform.Release()

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform