Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form as Top Level Form
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00059458
Message ID:
00059533
Views:
41
>>>>>>>>Hi all,
>>>>>>>>
>>>>>>>>I've tried to design a form to come out as Top-Level Form (ShowWindow property/SDI). When I run my program, everything is OK except the window is not focus. If I have Explorer on, the window will be behind Explorer. Please help.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>Farouk Yew Abdullah
>>>>>>>
>>>>>>>I have experienced this also, and eventually abandoned the approach. I would also like to know why this happens.
>>>>>>
>>>>>>At runtime if you will include a config.fpw that has screen=off your form will have focus.
>>>>>>Even if in your code you turn the screen off you must have config.fpw do the same because the screen is active and then you hide it in your program. config.fpw happens first so your form must then recieve focus.
>>>>>>
>>>>>>Hope this helps
>>>>>
>>>>>Is there anyhing else needed to specify that there is a config.fpw?
>>>>>I don't think it's mere existence is changing anything...
>>>>
>>>>It has to be in the directory that the app is running from and it only seem's to work when running exe.
>>>
>>>It is (in the directory) and it doesn't (work).
>>
>>Do you by chance have a wait window come up be for the screen? I had one and it drove me nuts before I moved it to the activate of the screen. My guess is that if you have anything come up before the screen it will not get focus.
>
>Here is what we do.
>
>CONFIG.FPW
>screen=off
>(other stuff)
>
>IN MAINBOOT.PRG
> _SCREEN.VISIBLE=.F.
> set talk off
> dbug=.F. &&TODO - DEBUG Flag
>
> If dbug
> _SCREEN.VISIBLE=.t.
> set escape on
> endif
>
> do form myform
>
>IN FORM ShowWindow-select 2
>as top level form

Ahhh... right you are. That was my problem.
Thanks a ton, Jeff.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform