January 1, 2005

WinTask - WindowFromPoint

'
' WindowFromPoint
'
' Author: Joe Strazzere
'
' "user32" Alias "WindowFromPoint"
' (ByVal xPoint As Long,
' ByVal yPoint As Long) As Long

 

x=100
y=100

 

hwnd = External("user32","WindowFromPoint", x, x)

 

msgbox("The window at ("+str$(x)+","+str$(y)+") is:"+GetWindowName$(hwnd),,"WindowFromPoint")