Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Releasing windows defined by a form
Message
De
04/09/2007 04:48:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Releasing windows defined by a form
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01252092
Message ID:
01252092
Vues:
71
Hi,

I have a form, lets call it FormA which defines a window in its init event and release it in its unload event as below

-------------
init event
-------------
Line1:
DEFINE WINDOW Output ;
AT 0, 0 Size 39, 60 ;
IN Desktop ;
NAME oOutputWin ;
FONT "Verdana", 11 Style "B" ;
TITLE "Output display" ;
FLOAT ;
GROW ;
NOMDI ;
MINIMIZE
Line2:
oOutputWin.Name = [frmOutput]

------------------
unload event
------------------
RELEASE WINDOWS Output
DODEFAULT()

When I run FormA, I use debugger to watch the _SCREEN.FORMS, both reference for FormA and the 'Output' window it defines are present.
When I close FormA, again from the _SCREEN.FORMS, I find that only FormA's reference is gone, the reference for 'Output' window remains!
However, if Line2 in the init event is removed both FormA and 'Output' window's reference will be nicely released.

My question (I am very curious),
Why the line 'oOutputWin.Name = [frmOutput]' will stop the 'Output' window from being released properly in the unload event of FormA?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform