Jump to content
Tom Mueller

Delphi 11.0 has a different form Caption offset than Delphi 10.4

Recommended Posts

Hello

 

Has anyone noticed that in Delphi 11.0 the indentation of the form caption is larger than in Delphi 10.4?

image.png.e4f98b5042ca7e565d1b7d6d315ca610.png
 

Especially under Windows 11 the small indent with Delphi 10.4 is irritating.

image.png.52a4a700ea2ad733353b0d72eaf7fe87.png

IMO Delphi 11.0 makes the better indentation.

 

Is there a way in Delphi 10.4 to adjust the intent of the form caption (without using Styles)?

 

Best regards

Tom

 

Share this post


Link to post

Yes, OwnerDraw would probably work - if I use a base form for all the forms in an application.

I hoped that there is a more simple way to I just adjust the intent of the caption.

Share this post


Link to post

A fresh VCL forms application shows a Delphi icon in front of the window title. What did you do to remove that?

image.png.03c71aaa753bb7d79d78b769ede5299c.png

Share this post


Link to post
On 10/7/2021 at 12:39 PM, Uwe Raabe said:

A fresh VCL forms application shows a Delphi icon in front of the window title. What did you do to remove that?

Form 652. That's a pretty extended hello world collection!

  • Haha 4

Share this post


Link to post
1 hour ago, aehimself said:

Form 652. That's a pretty extended hello world collection!

I heard that he is starting every day over!

  • Haha 1

Share this post


Link to post

Why has this changed? Is the VCL code custom drawing in Delphi 11 where previously it let the system do it? Or vice versa? Or both custom drawing and the code has changed? 

Edited by David Heffernan

Share this post


Link to post

Also the caption height of the form with BorderStyle = bsDialog is bigger in Delphi 11 compared to 10.4,

while form height is smaller:

image.thumb.png.c41d4f17c260741e86b6fec14eb00a94.png

Share this post


Link to post

strange, delphi is not drawing these forms itself? vcl is just a door to the underlaying windows api?

or does this depends wether you'r using vcl styles or something similar?

 

Edited by mvanrijnen
  • Haha 1

Share this post


Link to post

It's a nightmare when you have 350+ frames and forms that may need a touch-up, and you still can't be sure they won't be f'd up if two people with different DPI settings edit them.

Share this post


Link to post
5 minutes ago, mvanrijnen said:

vcl is just a door to the underlaying windows api

Mostly, yes.

Share this post


Link to post

You have to design it yourself, 

 

On click form properties...

BorderStyle : bsNone

 

OnPaint

procedure TForm1.FormPaint(Sender: TObject);
begin
  OnBasePaint(ClientWidth, ClientHeight, Canvas);
end;

 

procedure TfmMain1.OnBasePaint(ClientWidth, ClientHeight: Integer; Canvas: TCanvas);
var
  Rect: TRect;
begin
  Rect.Left := 0;
  Rect.Top := 0;
  Rect.Bottom := ClientHeight;
  Rect.Right := ClientWidth;
  with Canvas do
  begin
    // Pen.Width := 2;
    // Brush.Color := $00000000;
    // Pen.Color := $006B6B6B;
    // Rectangle(0, 0, ClientWidth, ClientHeight);
  end;
end;

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×