>>>>>>>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
It's Time to get a gun.
That's what I've been thinkin.
I think I can afford one, If I do a little less Drinkin.www.TrueGeeks.com