FMX.Forms.TScreen.DisplayFromPoint
Delphi
function DisplayFromPoint(const Point: TPoint): TDisplay; overload;
function DisplayFromPoint(const Point: TPointF): TDisplay; overload;
C++
Fmx::Types::TDisplay __fastcall DisplayFromPoint(const System::Types::TPoint &Point)/* overload */;
Fmx::Types::TDisplay __fastcall DisplayFromPoint(const System::Types::TPointF &Point)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Forms.pas FMX.Forms.hpp |
FMX.Forms | TScreen |
Description
Returns the display having the nearest top-left corner from the specified Point
point.
DisplayFromPoint returns the display whose work area's top-left corner is the nearest (in the virtual screen coordinates) from the specified Point
point.
The distance is calculated as the sum of absolute values of offsets between the Top and Left coordinates of a WorkArea and the correspondent X or Y coordinates of the specified Point
point. That is like:
Abs(WorkArea.Top-Point
.Y) + Abs(WorkArea.Left-Point
.X)
The virtual screen is the bounding rectangle of all displays used to comprise the desktop.