Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is probably impossible, but...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00279088
Message ID:
00279269
Vues:
17
>>>>>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...
>
>Nope, QueryUnload fires with RELEASE WINDOW or CLEAR WINDOW even fired from inside the form or any control on it.

I know there's some RELEASE that causes the Release to fire rather than QueryUnload; I'll have to dig around and find the example. You're probably right about CLEAR WINDOWS.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform