Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
This is probably impossible, but...
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00279088
Message ID:
00279261
Views:
12
>>>Ed,
>>>
>>>>>...the sequence QueryUnload/Destroy/Unload is invoked by releasing the last object ref or RELEASE/CLEAR type commands issued outside the form or the default SHUTDOWN event for VFP.<<
>>>
>>>Releasing the last object ref to a form, or RELEASE/CLEAR commands issued outside the form do NOT fire either the RELEASE or the QUERYUNLOAD, in my testing. It jumps straight to Destroy.
>>>
>>>DO FORM test NAME oForm LINKED
>>>oForm=.NULL. *or* RELEASE oForm --> go straight to DESTROY.
>>>
>>>The default Shutdown, as you mentioned, does fire QueryUnload.
>>
>>It seems to on mine at least - put a NODEFAULT, thisform.Show() and a WAIT WINDOW 'Got to QueyUnload' in the QueryUnload and it'll fire - you may be ending up with a dangling object...
>
>Hi Ed,
>
>QueryUnload fires only under the following circumstances: CLEAR WINDOWS, RELEASE WINDOWS, or QUIT commands are encounter or the user selects the close option from the control menu or the use clicks the close (X) box. It doesn't fire when ThisForm.Release is issued. That's why any issuing of ThisForm.Release often is done in this fashion:
IF ThisForm.QueryUnload()
>  ThisForm.Release
>ENDIF
yes, I know that explicitly firing the Release or issuing the RELEASE WINDOW or CLEAR WINDOW inside the form always fires release and doesn't fire QueryUnload...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform