User32MonitorFromRect(NativeRectangle, MonitorFromFlags) Method
Retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true)]
static IntPtr MonitorFromRect(
[InAttribute] NativeRectangle% refRect,
MonitorFromFlags flags
)
[<DllImportAttribute("User32.dll", ExactSpelling = true)>]
static member MonitorFromRect :
refRect : NativeRectangle byref *
flags : MonitorFromFlags -> IntPtr
No code example is currently available or this language may not be supported.
- refRect NativeRectangle
-
A NativeRectangle structure that specifies the rectangle of interest in virtual-screen coordinates.
- flags MonitorFromFlags
-
Determines the function's return value if the rectangle does not intersect any display monitor
IntPtr
If the rectangle intersects one or more display monitor rectangles,
the return value is an HMONITOR handle to the display monitor that has the largest area of intersection with the rectangle.
If the rectangle does not intersect a display monitor, the return value depends on the value of
flags.