Private Declare Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Long, ByVal yPoint As Long) As LongPrivate Declare Function GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As POINTAPI) As Long用第二个函数取得鼠标的位置,然后用第一个函数取得鼠标位置处的控件(窗口)的句柄.
然后WindowFromPoint 即可