Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing form's modality on the fly.
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00518554
Message ID:
00518580
Views:
7
This message has been marked as the solution to the initial question of the thread.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform