Hello, I'd like to know what APIs I need (and how to use them) to get the position of a window based on its Title or Hwnd. Thanks.
Printable View
Hello, I'd like to know what APIs I need (and how to use them) to get the position of a window based on its Title or Hwnd. Thanks.
VB Code:
Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hwnd As Long, lpRect As RECT) As Long
Here
-> hWnd
Identifies the window.
-> lpRect
Points to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window.
also structure of rect
VB Code:
Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type