public static bool GetWindowRect(IntPtr hWnd, out Rectangle lpRect) { WindowsAPI.Rect lpRect1 = new WindowsAPI.Rect(); WindowsAPI.GetWindowRect(hWnd, out lpRect1); lpRect = new Rectangle(lpRect1.Left, lpRect1.Top, lpRect1.Right - lpRect1.Left, lpRect1.Down - lpRect1.Top); return(true); }
private static extern bool GetWindowRect(IntPtr hWnd, out WindowsAPI.Rect lpRect);