This func does the job: Func _MouseIsOverHWnd($hWnd) Local $bMouseOver If not WinActive($hWnd) then return False Local $aMousePos = MouseGetPos() Local $aWinPos = WinGetPos($hWnd) if ($aMousePos[0] < $aWinPos[0] Or $aMousePos[0] > $aWinPos[0] + $aWinPos[2]) Or ($aMousePos[1] < $aWinPos[1] Or $aMousePos[1] > $aWinPos[1] + $aWinPos[3]) Then $bMouseOver = False Else $bMouseOver = True EndIf