private void SetOrientation(Win32.RotationMode mode) { return; Win32.DEVMODE devMode = new Win32.DEVMODE(); devMode.dmSize = (short)Marshal.SizeOf(typeof(Win32.DEVMODE)); devMode.dmFields = 0x00800000; devMode.dmDisplayOrientation = (int)mode; Win32.ChangeDisplaySettingsEx(null, ref devMode, IntPtr.Zero, 0, IntPtr.Zero); }