Hi John!
Getforegroundwindow() retrieve the handle to most top-level window in
hierarchy. IOW, if you have an application with toplevel form as main form,
you will get the handle to this window...
I'm using this function in my class Sysinfo for fiddling with window such
as flashing etc...
As for your second question: maybe Activate window will do the trick?
>I tried your GetForegroundWindow() Win32API call plus all the > All of
them are invalid for the current window except for one Win32
>On another note, If I create two windows, I should be able to do a
>SetFocus(hWnd) to change the focus to the first window I create if
>I am currently in the second window.... It doesn't seem to work...
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer