Skip to main content

dxGetTargetDPI(TComponent) Method

Returns the target DPI for scaling the specified component (control).

Declaration

function dxGetTargetDPI(AComponent: TComponent): Integer;

Parameters

Name Type
AComponent TComponent

Returns

Type
Integer

Remarks

A DPI-aware control scales pixel dimensions of all its UI elements according to the DPI value of the monitor device that currently shows more than a half of the application form where the control resides. Call this global function to obtain the DPI value of the monitor that the operating system considers current for the control passed as the AComponent parameter.

Note

If the operating system does not support per-monitor DPI awareness functionality (that is, Microsoft Windows® 8 or earlier), the dxGetTargetDPI function returns the system DPI instead.

See Also