public static NativeDisplay.DEVMODE GetDevMode() { NativeDisplay.DEVMODE dm = new NativeDisplay.DEVMODE(); dm.dmDeviceName = new String(new char[32]); dm.dmFormName = new String(new char[32]); dm.dmSize = (short)Marshal.SizeOf(dm); return(dm); }
public static extern int ChangeDisplaySettingsEx(string lpszDeviceName, ref NativeDisplay.DEVMODE lpDevMode, IntPtr hwnd, NativeDisplay.ChangeDisplaySettingsFlags dwflags, IntPtr lParam);
public static extern int EnumDisplaySettingsEx(string lpszDeviceName, int iModeNum, ref NativeDisplay.DEVMODE lpDevMode, uint dwFlags);