dummzeuch 1505 Posted November 7, 2021 Given a simple VCL project with an empty VCL form with only the following properties changed from the default: ClientHeight = 200 ClientWidth = 200 Scaled = False The dfm looks like this: object Form2: TForm2 Left = 0 Top = 0 Caption = 'Form2' ClientHeight = 200 ClientWidth = 200 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -12 Font.Name = 'Segoe UI' Font.Style = [] Scaled = False PixelsPerInch = 96 TextHeight = 15 end and the following code: type TForm2 = class(TForm) private public procedure Loaded; override; end; var Form2: TForm2; implementation {$R *.dfm} procedure TForm2.Loaded; begin Caption := Format('%dx%d', [ClientWidth, ClientHeight]); inherited; end; The project's manifest is configured for auto generate, runtime themes enabled and Per Monitor v2 DPI awareness. I would have expected the form to show with a Caption of '200x200' regardless of screen resolution or DPI. But I get this: And the form has indeed these dimensions. But why? Even if some scaling took place, I would have expected a client width of 300 rather than 618 This is Delphi 11 with Patch 1 applied. That's the latest oddity which is driving me crazy. Share this post Link to post
dummzeuch 1505 Posted November 7, 2021 2 minutes ago, Lajos Juhász said: Great, just what I need. GExperts for Delphi 11 just got pushed further into the future. I'm really despairing with this high DPI stuff. Maybe I should just give up and wait for 11.1. There are more fun things to do with my spare time than trying to somehow work around all those bugs in Delphi 11. 1 Share this post Link to post
zed 14 Posted April 2, 2022 Delphi 11.1 also changes the Form font size: - PixelsPerInch = 96 - TextHeight = 13 + TextHeight = 15 Share this post Link to post