George,
THanks! Glad to see that I'm not just plain nuts. Well.. Glad to see somone else has seen this behavior. <g>
Best,
DD
>I use Top Level Forms all of the time and started noticing this behavior in VFP 6. It is a major pain. The way that I have gotten around it is to add this code to the init of my Top Level Form:
>
>DECLARE INTEGER FindWindow IN Win32API STRING, STRING
>DECLARE INTEGER SetForegroundWindow IN "User32.dll" INTEGER
>hWnd = FindWindow(0,"Account Analysis Input")
>=SetForegroundWindow(hWnd)
>
>The second parameter in the FindWindow() is the caption of the form.
>
>HTH,
>George
>
>>Hi Folks,
>>
>>Say, when I create a simple project with a launching PRG calling a Top Level form after the form launches it appears to not have focus.
>>
>>That is, the top bar is grey as opposed to the blue I normally see when an object has Windows focus.
>>
>>I have a _screen.visible = .f. in the PRG as well.
>>
>>I'm trying to see if this is a bug or what might be required to make the form have focus when launched from a shortcut.
>>
>>I've dug around a bit looking for a mention of this and can't find any FAQ or anything on it.
>>
>>Best,
>>
>>DD
Best,
DD
A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.