User32MonitorFromRect(Rectangle, 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.
[DllImportAttribute("User32.dll", ExactSpelling = true)]
public static IntPtr MonitorFromRect(
in Rectangle refRect,
MonitorFromFlags flags
)
<DllImportAttribute("User32.dll", ExactSpelling := true>]
Public Shared Function MonitorFromRect (
ByRef refRect As Rectangle,
flags As MonitorFromFlags
) As IntPtr
Dim refRect As Rectangle
Dim flags As MonitorFromFlags
Dim returnValue As IntPtr
returnValue = User32.MonitorFromRect(refRect,
flags)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true)]
static IntPtr MonitorFromRect(
[InAttribute] Rectangle% refRect,
MonitorFromFlags flags
)
[<DllImportAttribute("User32.dll", ExactSpelling = true)>]
static member MonitorFromRect :
refRect : Rectangle byref *
flags : MonitorFromFlags -> IntPtr
No code example is currently available or this language may not be supported.
- refRect Rectangle
-
A Rectangle 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.