>The GetActiveWindow definition:
>
>The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue.
>>So if this function is called from a FoxPro app's thread -- imho -- there is no chance to get any other window handle, but the FoxPro app's window.
Nope, not right. Try the following. It returns 0.
DECLARE INTEGER GetActiveWindow IN Win32API
LOCAL oShell
oShell = CREATEOBJECT('WScript.Shell')
oShell.Run("notepad.exe")
oShell.AppActivate("notepad")
? GetActiveWindow()
George
Ubi caritas et amor, deus ibi est