public static RECT GetWindowRectangle(IntPtr windowHandle) { RECT ret = new RECT(); GetWindowRect(windowHandle, out ret); return ret; }