Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

dxGetTargetDPI(TComponent) Method

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

#Declaration

Delphi
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