>nhWnd = FindWindow( 0, _chrWindowName ) >?"nhWnd = " + ALLTRIM(STR(nhWnd)) > >DECLARE INTEGER GetLastError; > IN WIN32API > > >DECLARE SHORT SetForegroundWindow IN USER32.DLL INTEGER hWnd >* I assume you've got the hWnd you want stored in the variable nhWnd >nResult = SetForegroundWindow(nhWnd) > >IF nResult # 0 > * the desired window and thread are now in the foreground > ?"Success" >ELSE > * the hWnd was not assigned to the foreground and the thread > * remains at its default priority > ?"nResult = 0" > nError = GetLastError() > ?"Error code: " + STR(nError) > >ENDIF >>I get: