Mega Code Archive

 
Categories / VisualBasic Script / Windows API
 

Get windows rectangle

Private Type Rect   Left As Long   Top As Long   Right As Long   Bottom As Long End Type Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, ByRef lpRect As Rect) As Long Public Sub TestRect()   Dim R As Rect   Call GetWindowRect(Application.hWnd, R)   Debug.Print R.Bottom End Sub