>Hi Matt,
>
>
>* handle of main FoxPro window (_screen)
>DECLARE INTEGER GetActiveWindow IN user32
>? GetActiveWindow()
>
>* handle of a window with keyboard focus
>DECLARE INTEGER GetFocus IN user32
>? GetFocus()
>
>
>
GetActiveWindow always returns FoxPro main window handle. For
GetFocus it is different. It may be a variety of windows: main window, command window, active MODIFY PROGRAM window, active form, even active ActiveX control.
No, it won't always return the FoxPro main window handle. If VFP is not the active window when the code is run, then the window handle will be that of the window that is active. Since Win32 relies on pre-emptive multi-tasking, this is a possibility.
George
Ubi caritas et amor, deus ibi est