User32ChangeDisplaySettings Method

Changes the settings of the default display device to the specified graphics mode.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Ansi, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static DisplaySettingsChange ChangeDisplaySettings(
	ref DevMode refDevMode,
	ChangeDisplaySettingsFlags flags
)

Parameters

refDevMode  DevMode
A pointer to a DevMode structure that describes the new graphics mode.

If refDevMode is , all the values currently in the registry will be used for the display setting.

Passing for the refDevMode parameter and 0 for the flags parameter is the easiest way to return to the default mode after a dynamic mode change.

flags  ChangeDisplaySettingsFlags
Indicates how the graphics mode should be changed.

Return Value

DisplaySettingsChange
A DisplaySettingsChange value that specifies the operation result.

Remarks

See Also