Skip to main content

dxGetCurrentScaleFactor(TComponent,Integer,Integer) Method

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

Declaration

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

Parameters

Name Type
AComponent TComponent
M Integer
D Integer

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