Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to detect when another form is closed?
Message
De
30/11/2008 10:07:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
30/11/2008 05:08:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01364669
Message ID:
01364702
Vues:
23
>OTOH, if the parent form is always reactivated after the child form is closed by the user interactively, perhaps storing the pointer in parentForm.DeActivate() and restoring it in parentForm.Activate() might work, too.

I agree, some sort of callback function is needed - the child needs to tell the parent when it exited, or the parent may check for the kid when it activates. Though, it may activate for a dozen other reasons, which would involve more code to isolate this condition (did we launch the child form already? did we find it closed already or should we check now?), so callback is IMO far better.

And it doesn't have to be much - a simple property set by the child form may suffice. Well, a property with _assign method :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform