internal static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
/// <summary> /// Get a windows rectangle in a .NET structure /// </summary> /// <param name="hwnd">The window handle to look up</param> /// <returns>The rectangle</returns> internal static Rectangle GetWindowRect(IntPtr hwnd) { RECT rect = new RECT (); GetWindowRect (hwnd, out rect); return rect.AsRectangle; }
internal static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);