public static void SetFullScreen(IntPtr hwnd, int X, int Y, int cx, int cy) { if (!InteropWindow.SetWindowPos(hwnd, InteropWindow.HWND_TOP, X, Y, cx, cy, 64U)) { throw new SystemException("Cannot call SetWindowPos()", (Exception) new Win32Exception(Marshal.GetLastWin32Error())); } }