Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DestroyWindow
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00420813
Message ID:
00420907
Vues:
19
>>>It might, depending on where the code to call SQLDISCONNECT() is. I'd make a SWAG saying that if it's in the QueryUnload or maybe Destroy method it might. The only way to know for certain would be to test it.
>>
>>This is true. I tested this using an object (could be your global application object). The Destroy event does fire when the application is shut down using the WM_CLOSE message.
>
>Thanks for the info, Larry. Do you test if QueryUnload() fires?

I didn't test that because I used an object created in the application, not the application itself (e.g. top-level form).

I used a session object instantiated with Createobject(). I treated it as if it were my application object. As long as the application shuts down gracefully (no C5 errors), the memory variables are released and the Destroy methods all fire.

If that didn't work, I was going to try and create a custom object bound to the _VFP object in the hopes that a CloseWindow event would fire and I could trap that. Unfortunately, _VFP doesn't export any events (at least not any VFPCOM ExportEvents can distinguish).
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform