The WindowEx.GetClientRect function retrieves the coordinates of a window's client area. The client coordinates specify the upper-left and lower-right corners of the client area. Because client coordinates are relative to the upper-left corner of a window's client area, the coordinates of the upper-left corner are (0,0).
table WindowEx.GetClientRect(
number hWnd --handle of window
);
Parameters
hWnd
Identifies the window whose client coordinates are to be retrieved.
Return Values
If the function succeeds, the return value is table containing client coordinates of specified window
The Left and Top members are zero. The Right and Bottom members contain the width and height of the window.
result = WindowEx.GetClientRect(Application.GetWndHandle());
left = result.Left;
top = result.Top;
right = result.Right;
bottom = result.bottom;
If the function fails, the return value is nil
if result ~= nil then
--do anything here
end