Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
This is probably impossible, but...
Message
De
20/10/1999 17:50:13
 
 
À
20/10/1999 16:58:38
Chris Crachiolo
Blackmoor Associates Incorporated
New York City, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00279088
Message ID:
00279133
Vues:
14
>Is there any way to trap the closing of a form (or form set) other than by making it non-closable and adding a "close" button? It appears that you can't return a value from the Destroy method to prevent it from proceeding, and I can't think of any other way this could be done.

Take a look at putting something in the QueryUnload method, which fires after Release but before Destroy if some action other than something invoking the Release method or a form method issuing a RELEASE command triggers shutdown - issuing a NODEFAULT prevents the form from unloading. The ReleaseType property is set before the QueryUnload fires, clicking the close control on the form sets ReleaseType to 1, so that's trappable. I've never used this approach to prevent things from happening, but the controls and properties are still intact before the code in Destroy fires...
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