public static void getWindowRect( IntPtr hwnd, out int x, out int y, out int width, out int height ) { RECT rect = new RECT(); GetWindowRect(hwnd, out rect); x = rect.X; y = rect.Y; width = rect.Width; height = rect.Height; }
static extern bool GetWindowRect(IntPtr hwnd, out RECT lpRect);
public bool Equals( RECT r ) { return r.left == left && r.top == top && r.right == right && r.bottom == bottom; }