So, where are
my stars then? :-)
BTW, it does not apply only to the form based on the class, just the opposite - the sample for the simplicity sake was created from the existing form using Class Browser "View Code" option.
Just add this code to corresponding places:
*Turn Modal
THISFORM.HIDE()
THISFORM.SHOW(1)
THISFORM.SHOW(2)
* Turn Modeless.
THISFORM.HIDE()
>Oops, stupid of me. I believe this is the exact way how I solved this problem in the past. The form should be set modal in designer and could be changed on the fly. I read Nick's FAQ, because I remembered, that there was some problem here.
>But it applies to form based on class, scx based forms work just fine with the technique you described.
>
>Thanks. Next time I would think a little bit longer before posting a message :)
>
>>Nadya,
>>What I usually do is something like this:
>>
>>*-- form's init()
>>LPARAMETER tlModal
>>
>>IF tlModal
>> This.WindowType = 1
>>ELSE
>> This.WindowType = 0
>>ENDIF
>>
>>HTH
>>
>>>Hi everyone,
>>>
>>>I have a form scx (not class based). I want to change its modality depending on parameter passed into the main program. How can I do it? I've read Nick's FAQ about it, but it's still unclear for me.
>>>
>>>Thanks in advance.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison