问题
I do not understand what is the purpose of PixelsPerInch
property... It seems it is useless. If Scaled
is checked, PixelsPerInch
cannot be modified. If Scaled
is unchecked and PixelsPerInch
is changed, the form size an font is scaled to a fixed value, regardless of the value you entered in PixelsPerInch
field. Of course, I checked the form size at runtime.
回答1:
Scaled is True
In the dfm file the PixelsPerInch
property contains the screen DPI value used when the form was designed. This is necessary in order to be able to scale control position and size values to different DPI screens at runtime.
Scaled is False
The PixelsPerInch
property is ignored and control position and size values are used unscaled.
来源:https://stackoverflow.com/questions/59778641/how-pixelsperinch-works-in-delphi-10-3-rio