Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "ChangeDisplaySettings" in [All]

Enums

.
Summary
.

Used with ChangeDisplaySettings and ChangeDisplaySettingsEx

user32

.
Summary
.

    public enum ChangeDisplaySettingsFlags : uint

.

    Public Enum ChangeDisplaySettingsFlags As UInteger

.
Summary
.

static extern DISP_CHANGE ChangeDisplaySettingsEx(string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, ChangeDisplaySettingsFlags dwflags, IntPtr lParam);

.

Private Shared Function ChangeDisplaySettingsEx(ByVal lpszDeviceName As String, ByRef lpDevMode As DEVMODE, ByVal hwnd As IntPtr, ByVal dwflags As UInteger, ByVal lParam As IntPtr) As DISP_CHANGE

.

ChangeDisplaySettingsFlags

.

See also ChangeDisplaySettings

.

ChangeDisplaySettingsEx(d.DeviceName, ref dm, IntPtr.Zero, CDS_UPDATEREGISTRY, IntPtr.Zero);

.
Documentation
[ChangeDisplaySettingsEx] on MSDN
.
Summary
.

    public enum ChangeDisplaySettingsFlags : uint

.

Public Enum ChangeDisplaySettingsFlags As UInteger

.
Summary
The EnumDisplaySettings API enumerates the display settings for the machine (surprise!). It returns a DEVMODE struct which contains the current settings. Use ChangeDisplaySettings to change those values.

coredll

.

static extern int ChangeDisplaySettingsEx(string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, int dwflags, IntPtr lParam);

.

Declare Function ChangeDisplaySettingsEx Lib "coredll.dll" (ByVal lpszDeviceName As String, ByVal lpDevMode As Byte(), ByVal hwnd As IntPtr, ByVal dwflags As CDSFlags, ByVal lParam As IntPtr) As CDSRet

.

    ' Flags for ChangeDisplaySettings

.

    ' Return values for ChangeDisplaySettings

.

    static extern int ChangeDisplaySettingsEx(string lpszDeviceName,

.

        ChangeDisplaySettingsEx(null, ref DevM2, IntPtr.Zero, 2, IntPtr.Zero); // 2 = test

.

        ChangeDisplaySettingsEx(null, ref devmode, IntPtr.Zero, 2, IntPtr.Zero); // 2 = test

.

        ChangeDisplaySettingsEx(null, ref devmode, IntPtr.Zero, 0, IntPtr.Zero); // 0 = set

.

    Friend Shared Function ChangeDisplaySettingsEx(ByVal lpszDeviceName As String, ByVal lpDevMode As Byte(), ByVal hwnd As IntPtr, ByVal dwflags As CDSFlags, ByVal lParam As IntPtr) As CDSRet

.

        Dim ret As CDSRet = ChangeDisplaySettingsEx(Nothing, devMode.Data, IntPtr.Zero, 0, IntPtr.Zero)

.
Documentation
[ChangeDisplaySettingsEx] on MSDN

 
Access PInvoke.net directly from VS: