Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal, Modeless
Message
From
27/08/2001 02:54:28
 
 
To
27/08/2001 02:28:45
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00549347
Message ID:
00549354
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Hi Jimi,

U can put the following code in your form and your form will behave modal.

_screen.AlwaysOnTop = .T.
_screen.AlwaysOnTop = .F.


Jimi, why dont u create a public application object which is visible to all the forms, You can easily access or change the desired property without side effects.
Example :
    
    Applicationx is a custom class which u can create through a class deigner. U can add properties to the object which will be visible to all the forms.

Public oApp
oApp             = CREATEOBJECT('Applicationx')
oApp.User      	 = olScreen.User
oApp.User_ID   	 = olScreen.User_ID
sanjay.




>Hi Nancy,
>
>No subclass, just a single form.. not using form wizard.. only a plain form with 3 buttons on it.. i'm using VFP6.0
>
>I also added a form property to store which button is pressed then return it at release events.. that's why i'm using "do form MyForm to MyVar"..
>
>maybe more details:
>objects: Myform, button1, button2, exit_button
>
>events:
>
>Myform.release
>return thisform.user_option
>
>
>button1.click
>thisform.user_option=1
>thisform.release
>
>
>button2.click
>thisform.user_option=2
>thisform.release
>
>
>exit_button.click
>thisform.release
>
>
>the form is set to modal, closable=0, movable=0, controlbox=0, alwaysontop=1, autocenter=1, and nothing more.. have I done anything that would rune the modal property?
>
>thanks for your reply,
>Jimi
>
>
>>>hello everyone,
>>>
>>>in the form designer i have set a form to modal, and added some codes on it.
>>>
>>>then I run the form in another program by "do form MyForm to MyVar", it says I can't use the "to" clause because MyForm is not modal...
>>
>>Sounds modeless to me. Is this a subclass of something? Did you use the Form wizard to make it? Are you using a framework? What version (and build #) of VFP are you using?
>>
>>Put code in the init that you can put a break point, check the state in the debugger.
>>
>>>also when i run the .exe, the form disappear immediately after it show up -- exactly the same as a modeless form..
>>
>>Could also be due to INIT() returning .F. Or some control on the form failing to instantiate can case the whole form to die, too.
>>
>>>But why? What did I do that cause the modal form to act as a modeless one? Any idea please?
>>
>>DO FORM MyForm Name linked NOSHOW
>>myForm.show(1)

>>
>>Would do it.
Sanjay Dhiraj Patel

MCSE, MCDBA

Net2Biz (Thailand)
Previous
Reply
Map
View

Click here to load this message in the networking platform