Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Releasing Forms
Message
 
 
To
02/11/1998 16:43:13
Thomas Ianuzzi
Information Security Consultants, Inc.
Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00153720
Message ID:
00153810
Views:
18
Thomas,

It most likely works when you run the two forms from the command window and doesn't when you run it from a prg. That's because VFP is creating public memvars for the forms from the command window.

You should not code your two forms so they are forced to know the names of each other. If the bigform launches the littleform it should pass THISFORM to the the littleform.Init() the reference can be stored:

lparameter oLauncher
this.oLauncher = oLauncher

then the click can:

thisform.oLauncher.Release()
thisform.Release()

You can also use the _screen.Forms[] collection and look for a form by it's Name property.

>In a project I an working on I have two forms open at the same time. Bigform and Littleform. Littleform contains a button. In the click event of that button I wish to close both Bigform and Litttleform and use the following code:
>
>Bigform.Release
>Thisform.Release
>
>Occasionally this code works and both objects close, but most of the time I get a message which states that Bigform cannot be found.
>
>Can anyone offer insight into why this happens and how I should rewrite my code.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform