Exemplo n.º 1
0
 public static extern bool EnumDisplaySettings(
     string deviceName,
     DisplaySettingsMode modeNum,
     ref DevMode devMode);
Exemplo n.º 2
0
 private static DisplaySetting[] GetDisplaySettings()
 {
     var settings = new List<DisplaySetting>();
     foreach (var display in GetDisplays())
     {
         var devMode = new DevMode().Initialize();
         if (Methods.EnumDisplaySettings(display.DeviceName, DisplaySettingsMode.CurrentSettings, ref devMode))
         {
             settings.Add(new DisplaySetting {DisplayName = display.DeviceName, DevMode = devMode});
         }
     }
     return settings.ToArray();
 }
Exemplo n.º 3
0
 public static extern ChangeDisplaySettingsExResults ChangeDisplaySettingsEx(
     string lpszDeviceName,
     ref DevMode lpDevMode,
     IntPtr hwnd,
     ChangeDisplaySettingsFlags dwflags,
     IntPtr lParam);