Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 1.63 KB

MonitorInfo.md

File metadata and controls

31 lines (22 loc) · 1.63 KB

MonitorInfo class

Contains full information about a display monitor. Inspired from: https://github.com/Jack251970/DesktopWidgets3.

public class MonitorInfo

Public Members

name description
static GetCursorDisplayMonitor() Gets the display monitor that contains the cursor.
static GetNearestDisplayMonitor(…) Gets the display monitor that is nearest to a given window.
static GetPrimaryDisplayMonitor() Gets the primary display monitor (the one that contains the taskbar).
Bounds { get; } Gets the display monitor rectangle, expressed in virtual-screen coordinates.
IsPrimary { get; } Gets if the monitor is the primary display monitor.
Name { get; } Gets the name of the display.
WorkingArea { get; } Gets the work area rectangle of the display monitor, expressed in virtual-screen coordinates.
override ToString()
static GetDisplayMonitors() Gets the display monitors (including invisible pseudo-monitors associated with the mirroring drivers).

Remarks

Use this class to replace the System.Windows.Forms.Screen class which can cause possible System.PlatformNotSupportedException.

See Also