EnumDisplaySettings (user32)
Last changed: 85.230.216.217

.
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.

C# Signature:

[DllImport("user32.dll")]
public static extern int EnumDisplaySettings (
      string deviceName, int modeNum, ref DEVMODE devMode );  

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]

public struct DEVMODE

{

    [MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)]
      public string dmDeviceName;
    public short  dmSpecVersion;
    public short  dmDriverVersion;
    ...

}

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

http://www.codeproject.com/csharp/CSDynamicScrRes.asp?df=100&forumid=38736&select=800137

Alternative Managed API:

Do you know one? Please contribute it!

Documentation