Public Declare Function WindowFromPoint Lib "user32" _
(ByVal xPoint As Long, ByVal yPoint As Long) As Long
Public Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Public Type POINTAPI
x As Long
y As Long
End TypePrivate Sub Command1_Click() Dim P As POINTAPI
GetCursorPos P
debug.print WindowFromPoint(P.x, P.y)End Sub
(ByVal xPoint As Long, ByVal yPoint As Long) As Long
Public Declare Function GetCursorPos Lib "user32" _
(lpPoint As POINTAPI) As Long
Public Type POINTAPI
x As Long
y As Long
End TypePrivate Sub Command1_Click() Dim P As POINTAPI
GetCursorPos P
debug.print WindowFromPoint(P.x, P.y)End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货