Back to Devexpress

dxGetCurrentScaleFactor(TComponent,Integer,Integer) Method

vcl-dxdpiawareutils-dot-dxgetcurrentscalefactor-x28-5581a043-x29.md

latest1.6 KB
Original Source

dxGetCurrentScaleFactor(TComponent,Integer,Integer) Method

Returns the scale numerator and denominator used to display the specified form or component.

Declaration

delphi
function dxGetCurrentScaleFactor(AComponent: TComponent; out M: Integer; out D: Integer): Boolean;

Parameters

NameType
AComponentTComponent
MInteger
DInteger

Returns

Type
Boolean

Remarks

Call this global function to obtain the desktop scale factor applied to the component or form passed as the AComponent parameter. If the scale factor’s numerator and denominator are successfully obtained as the M and D parameters, the dxGetCurrentScaleFactor function returns True ; otherwise – False (that is, if the specified control and its parents are not dpi-aware).

The dxGetCurrentDPI global function calls the dxGetCurrentScaleFactor function internally to calculate the DPI value at which the specified component or form is displayed.

See Also

dxDPIAwareUtils Unit