예제 #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);