User32GetMonitorInfo(IntPtr, MonitorInfoEx) Method

Retrieves information about a display monitor.

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")]
public static bool GetMonitorInfo(
	IntPtr hWnd,
	ref MonitorInfoEx mi
)

Parameters

hWnd  IntPtr
A handle to the display monitor of interest.
mi  MonitorInfoEx
A pointer to a MonitorInfoEx structure that receives information about the specified display monitor.

You must set the SizeOfStruct member of the structure to Marshal.SizeOf(Of MonitorInfoEx) before calling the GetMonitorInfo function.

Return Value

Boolean
If the function succeeds, the return value is .

If the function fails, the return value is .

Remarks

See Also