public static ChangeSettingsResult ChangeResolutionPermanently(RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenRotation = rotMode; return(screen.UpdateSettingsInRegistry()); }
public static ChangeSettingsResult ChangeResolutionPermanently(int width, int height, RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenWidth = width; screen.ScreenHeight = height; screen.ScreenRotation = rotMode; return screen.UpdateSettingsInRegistry(); }
public static ChangeSettingsResult ChangeResolutionTemporary(int width, int height, RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenWidth = width; screen.ScreenHeight = height; screen.ScreenRotation = rotMode; return(screen.UpdateSettingsToFullscreen()); }
public static ChangeSettingsResult ChangeResolutionPermanently(int width, int height, RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenWidth = width; screen.ScreenHeight = height; screen.ScreenRotation = rotMode; return(screen.UpdateSettingsInRegistry()); }
/// <summary> /// Create a display screen object with the given settings. /// If a setting is not given it will be used the current setting /// </summary> /// <param name="width">Screen width</param> /// <param name="height">Screen height</param> /// <param name="mode">Screen rotation mode</param> public DisplayScreen(int width, int height, RotateDesktopMode mode) : this() { Initialize(width, height, null, null, mode); }
/// <summary> /// Create a display screen object with the given settings. /// If a setting is not given it will be used the current setting /// </summary> /// <param name="width">Screen width</param> /// <param name="height">Screen height</param> /// <param name="frequency">Screen frequency</param> /// <param name="color">Screen color mode</param> /// <param name="mode">Screen rotation mode</param> public DisplayScreen(int width, int height, int frequency, short color, RotateDesktopMode mode) : this() { Initialize(width, height, frequency, color, mode); }
private void Initialize(int? width, int? height, int? frequency, short? color, RotateDesktopMode? mode) { if (height.HasValue) ScreenHeight = height.Value; if (width.HasValue) ScreenWidth = width.Value; if (mode.HasValue) ScreenRotation = mode.Value; if (frequency.HasValue) ScreenFrequency = frequency.Value; if (color.HasValue) ScreenColor = color.Value; }
public static ChangeSettingsResult ChangeResolutionPermanently(RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenRotation = rotMode; return screen.UpdateSettingsInRegistry(); }
public static ChangeSettingsResult ChangeResolutionTemporary(int width, int height, RotateDesktopMode rotMode) { DisplayScreen screen = new DisplayScreen(); screen.ScreenWidth = width; screen.ScreenHeight = height; screen.ScreenRotation = rotMode; return screen.UpdateSettingsToFullscreen(); }