Hi!
Try to use SetForegroundWindow() API function. To get HWND of the window (Windows API window handle), use FindWindow() API function. FindWindow() require to use window caption, if you afraid that window caption cold be in another window too, set caption to something unique(based on sys(3) function, for example), use FindWindow(), then set correct window caption back. Check also API section here at UT.
HTH.
>Hi
>
>I have a form that loses focus when loaded, it is run AS TOP LEVEL and is ALWAYSONTOP, but when I load it with SCREEN = OFF it loses the focus.
>
>Any ideas?
>
>Thanks
>Kev
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.