>>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