User32MonitorFromPoint(NativePoint, MonitorFromFlags) Method

Retrieves a handle to the display monitor that contains a specified point.

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", ExactSpelling = true)]
public static IntPtr MonitorFromPoint(
	NativePoint pt,
	MonitorFromFlags flags
)

Parameters

pt  NativePoint
A NativePoint structure that specifies the point of interest in virtual-screen coordinates.
flags  MonitorFromFlags
Determines the function's return value if the point is not contained within any display monitor

Return Value

IntPtr
If the point is contained by a display monitor, the return value is an HMONITOR handle to that display monitor.

If the point is not contained by a display monitor, the return value depends on the value of flags.

Remarks

See Also