Пример #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!");
        }
Пример #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!");
            }
        }
Пример #3
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Пример #4
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);
Пример #5
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Пример #6
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);