Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing windows defined by a form
Message
From
04/09/2007 04:48:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Releasing windows defined by a form
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01252092
Message ID:
01252092
Views:
72
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?
Next
Reply
Map
View

Click here to load this message in the networking platform