Ejemplo 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!");
        }
Ejemplo 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!");
            }
        }
Ejemplo n.º 3
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Ejemplo n.º 4
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);
Ejemplo n.º 5
0
 public static extern int EnumDisplaySettings(string deviceName, int modeNum, ref DevMode devMode);
Ejemplo n.º 6
0
 public static extern int ChangeDisplaySettings(ref DevMode mode, int dwFlags);