RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TScreen.MonitorFromRect Method

Returns the monitor where a specified rectangle is located.

Pascal
function MonitorFromRect(const Rect: TRect; MonitorDefault: TMonitorDefaultTo = mdNearest): TMonitor;
C++
__fastcall TMonitor MonitorFromRect(const TRect Rect, TMonitorDefaultTo MonitorDefault = mdNearest);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!