Vcl.Forms.TScreen.MonitorFromRect
Delphi
function MonitorFromRect(const Rect: TRect; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;
C++
TMonitor* __fastcall MonitorFromRect(const System::Types::TRect &Rect, TMonitorDefaultTo MonitorDefault = (TMonitorDefaultTo)(0x0));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Forms.pas Vcl.Forms.hpp |
Vcl.Forms | TScreen |
Description
Returns the monitor where a specified rectangle is located.
Call MonitorFromRect determine the monitor where a specified boundary rectangle falls.
Rect is the coordinates of the rectangle to locate. It is in pixels relative to the upper-left corner of the primary monitor.
MonitorDefault indicates how to select a monitor when the rectangle does not fall entirely on a single monitor.