Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing a form - click X vs. code based release
Message
 
To
05/10/1998 16:43:56
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00144016
Message ID:
00144038
Views:
30
>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).
Previous
Reply
Map
View

Click here to load this message in the networking platform