Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding to a Form's Destroy Event
Message
De
30/12/2004 12:02:26
 
 
À
30/12/2004 10:50:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00973290
Message ID:
00973318
Vues:
35
Hi Brian,

Why not just notify your generic class tracker class from the form's Release event? If your forms inherit from a common ancestor form, just add some extra code to do this in the Release event. This way, you don't actually need to use BindEvent.

>I am trying to write a generic class that keeps track of open windows, and I want this class to be alerted when a form closes. My thought was to use BindEvent to bind one of my classes methods to the form's Destroy Event. However, I am not able to get this to work, regardless of BindEvent's flag setting. The closest I can come is to bind to the QueryUnload event, but this is not ideal, as I don't know there is a way to check if the QueryUnload issued a nodefault, short of placing custom code in each form, which I would rather not do if possible. I haven't found a source that says you can't bind to the destroy event, but there is at least one source that shows it might be possible. I am using VFP8
>
>Thanks,
>
>
>Brian Vander Plaats
>Vogel Paint, Inc.
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform