The MONITORINFO structure contains information about a display monitor.
The GetMonitorInfo function stores information in a MONITORINFO structure or a MONITORINFOEX structure.
The MONITORINFO structure is a subset of the MONITORINFOEX structure. The MONITORINFOEX structure adds a string member to contain a name for the display monitor.
[StructLayout(LayoutKind.Sequential)]
private class MONITORINFO
{
public int cbSize;
public RECT rcMonitor;
public RECT rcWork;
public uint dwFlags;
}
Do you know one? Please contribute it!
If the monitor is the primary monitor the flag will be set too MONITORINFOF_PRIMARY. The declaration for MONITORINFOF_PRIMARY is
const uint MONITORINFOF_PRIMARY = 1;
Please add some!
MONITORINFO monitorInfo = new MONITORINFO();
monitorInfo.cbSize = Marshal.SizeOf(monitorInfo);