Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sorry to be such a Dullard!
Message
From
25/07/2010 20:03:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
25/07/2010 19:58:06
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01473802
Message ID:
01473810
Views:
157
This message has been marked as the solution to the initial question of the thread.
>>>>How do you close one modeless form from another modeless form?
>>>>
>>>>Do form NewForm name New
>>>>
>>>>.... then what?
>>>>
>>>>Thanks,
>>>>
>>>>dg
>>>
>>>New.Release()
>>
>>
>>Thank you! Hadda brain lock.....'errrr something locked ;)
>>
>>dg
>
>
>Still gotta lock.... Object New is not found????

Looks like variable got out of scope. Instead of a variable, use a property. I'll call it "otherform".

From form 1:
ThisForm.AddProperty("otherform")
do form ... name ThisForm.OtherForm
* If that doesn't work:
do form ... name Temp
ThisForm.OtherForm = Temp
Later, to close it:
ThisForm.OtherForm.Release()
Note that you can also do other manipulation with the other form, such as hiding or showing it, changing the .Width and .Height, etc.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform