Hi all,
I'm trying to get the handle of the current active window but without success.
I made this self-contained sample that show the problem. It runs in background without a Windows active and check every 20 seconds which is the current active window (es. I'm on Skype so it should return the Skype handle) but it Always return 0. Any ideas ? Thank you.
----
#include "FiveWin.ch"
function Main()
local n,hwnd
n:=Seconds()
do while .t.
sysrefresh()
if seconds()>n+20
hWnd:=GetActiveWindow()
if msgyesNo("Active Window handle is "+str(hWnd,10)+" Finish test ?")
exit
endif
n:=Seconds()
endif
enddo
----