Deanna mentioned that DPI can be detected as follows:
You can determine the DPI size using the TGraphicsObject.PixelsPerInch property and load another image.
However, the InnoSetup documentation assumes that TGraphicsObject does not have a PixelsPerInch attribute, it is an attribute of TFont objects.
In this way, DPI can be detected, and user settings will be implemented using code like this:
procedure CheckDPI; var CurrentDPI, StandardDPI, MediumDPI, LargeDPI: Integer; begin { Get the current DPI } CurrentDPI := WizardForm.Font.PixelsPerInch; { Store defaults determined from Windows DPI settings } StandardDPI := 96; { 100% } MediumDPI := 120; { 125% } LargeDPI := 144; { 150% } if (CurrentDPI >= StandardDPI) and (CurrentDPI < MediumDPI) then begin { Execute some custom code for small to medium DPI } end else if (CurrentDPI >= MediumDPI) and (CurrentDPI < LargeDPI) then begin { Execute some custom code for medium to large DPI } end else if (CurrentDPI >= LargeDPI) then begin { Execute some custom code for large DPI or above } end; end;
Tom Clarke Nov 20 '14 at 12:47 2014-11-20 12:47
source share