As already described in How PixelsPerInch works in Delphi 10.3 Rio? and Form.PixelsPerInch no longer used in Delphi Tokyo TForm.PixelsPerInch has no effect in Delphi Rio (I use Rio 10.3.3). I can change its value (either in the IDE or by editing the dfm file) to 96, 120, 144,... but the size of the form, font sizes etc. remain unchanged (both at designtime and runtime). Form.Scaled is true.
How can I enable correct scaling of forms in Delphi Rio if pixels per inch is different than 96, i.e. if Windows scaling is different from 100%?
I am migrating a project with more than 50 forms from Delphi XE5 to Rio. The project was developed at 120 pixels per inch in XE5 and had correct font sizes and form sizes, Form.Scaled is True, Form.PixelsPerInch is 120, Form.Font is 'Segoe UI' at 11 pt (this is identical to 9 pt at 96 pixels per inch). When opening the project in Rio at 120 pixels per inch all forms are too large and the font used is 'Segoe UI' at about 14 pt, i.e. Rio uses PixelsPerInch of 96 instead of 120 (which is given in the dfm file).
Asked
Active
Viewed 352 times
2

Matej
- 442
- 3
- 9
-
So what is your question? (Just "Any ideas?" doesn't count.) – Uwe Raabe Feb 17 '20 at 14:30
-
The question is: How can I enable correct scaling of forms in Delphi Rio if pixels per inch is different than 96, i.e. if Windows scaling is different from 100%? – Matej Feb 17 '20 at 14:37
-
You should edit the question accordingly. – Ken Bourassa Feb 17 '20 at 14:37
1 Answers
0
I am not sure if these answer steps are actually working, as it is near to impossible to test before given my current system settings. But let us give it a try:
- set up XE5 in an environment with 96 dpi
- open the project
- open and save all forms
- open the project on your Rio system
- compile, run and check if it is working now
optional:
- play with the DPI settings in the Manifest section of the Project Options
- if that turns out to be worse, leave this setting at none

Uwe Raabe
- 45,288
- 3
- 82
- 130