[DllImport("user32.dll", SetLastError=true)]
static extern TODO ClientRectangle(TODO);
Declare Function ClientRectangle Lib "user32.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
None.
Please add some!
[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);
[StructLayout(LayoutKind.Sequential)]
private struct RECT
{
public int Left;
public int Top;
public int Right;
public int Bottom;
}
RECT rct = new RECT();
GetWindowRect(hwnd, ref rct);
string sampleText = "Window Properties: " rct.Left "; Top: " rct.Top "; Right: " rct.Right "; Bottom: " rct.Bottom "; Width: " (rct.Right - rct.Left) "; Height: " + (rct.Bottom - rct.Top);