Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing a form - click X vs. code based release
Message
 
À
05/10/1998 16:43:56
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00144016
Message ID:
00144038
Vues:
31
>Is there any way to tell if the user clicked the X to close a form, or if they clicked a code-bearing button? Short of setting some sort of flag or parameter to QueryUnload ?
>
>help?
>Tim

Tim,

This can be a bit confusing. With the X the queryunload fires, but with a clla to the Releae mehtod the queryunload does not fire. I coded my form class so the Release emthod calls the queryunload and respects the return vlaue form it. All of my testing for shut down ok is in the queryunload and I return .T. if all is ok and .F. if not. The release looks like this;
IF NOT THISFORM.QueryUnload()
   NODEFAULT
   RETURN
ENDIF
The form's ReleaseType property can be queried in the queryunload to find out if the object variable was released (0), the close button was used (1), or the user is quiting VFP (2).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform