Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Destroy event questions
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00966925
Message ID:
00966979
Vues:
6
Hi George,

Done what you said & all works fine.

Many thanks for your help. I now better understand how this works.

Rob



>>Hi!
>>
>>When the user closes my form I want to run my default class code for the form as if the user wants to save the changes, if the user chooses Yes, I want to validate my fields, if one is not correct I want to prevent the form form closing. If the user chooses No I want to exit but not save. If the user chooses Cancel I want to return to the form.
>>
>>My code for save,yes no cancel is in my default destroy class for the form
>>
>>How do I pick up that my default destroy event has returned .f. & stop ny form from closing.
>>
>>Hope this makes sense.
>>
>Rob,
>
>You need to put the code in the form's QueryUnload() event, and return .F. plus issue NODEFAULT if that's the case. If you have a close command button on the form, the following will do the trick for that
IF ThisForm.QueryUnload() THEN
>  ThisForm.Release
>ENDIF
Rob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform