[VB.NET] Window API WindowFromPoint 從滑鼠座標讀取視窗句柄(Hwnd)

  • 2754
  • 0

VON

宣告:
Declare Function WindowFromPoint Lib "user32" Alias "WindowFromPoint" (ByVal xPoint As Integer, ByVal yPoint As Integer) As Integer

用法:
利用 GetCursorPos API 取得滑鼠座標後
Hwnd=windowFromPoint(p)