Esempio n. 1
0
        /// <summary>
        /// Create a display screen object with the current settings
        /// </summary>
        public DisplayScreen()
        {
            _devMode = new DevMode();
            _devMode.dmDeviceName = new String(new char[32]);
            _devMode.dmFormName = new String(new char[32]);
            _devMode.dmSize = (short)Marshal.SizeOf(_devMode);

            if (0 == User32.EnumDisplaySettings(null, User32.ENUM_CURRENT_SETTINGS, ref _devMode))
                throw new SystemException("Cannot load current display settings!");
        }
Esempio n. 2
0
        /// <summary>
        /// Create a display screen object with the current settings
        /// </summary>
        public DisplayScreen()
        {
            _devMode = new DevMode();
            _devMode.dmDeviceName = new String(new char[32]);
            _devMode.dmFormName   = new String(new char[32]);
            _devMode.dmSize       = (short)Marshal.SizeOf(_devMode);

            if (0 == User32.EnumDisplaySettings(null, User32.ENUM_CURRENT_SETTINGS, ref _devMode))
            {
                throw new SystemException("Cannot load current display settings!");
            }
        }
Esempio n. 3
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Esempio n. 4
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);
Esempio n. 5
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Esempio n. 6
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);