Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
THISFORM.Release doesn't release the form!?
Message
From
06/11/1998 15:04:31
 
 
To
06/11/1998 15:00:29
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00154872
Message ID:
00155336
Views:
34
>>ThisForm.Release does not work from within an Init event. What I did when I wanted this to be the case was to set a variable that flagged whether the form should be released. Then in the Activate event you can put the ThisForm.Release within the If statement if the form should be released.
>>
>All you have to do is return .f. from init and the class will not instantiate.
>
>BOb

Agreed. but closing from Activate event is still reasonable as generic solution. Usually, form object is started by following:
IF Type("...oMyform")<>"O" and NOT IsNull(....oMyform)
 ...oMyForm.Show
ELSE
 ...oMyform=createobject("Myclass")
ENDIF
and as you see Activate event will always fire, but Init just in second case.
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform