New Delphi 10.3 project Applicaton - Manifest - Enable Runtime Themes, DPI Awareness Per Monitor v2 (so default)
procedure TForm24.FormCreate(Sender: TObject);
var Style : TStyleManager.TStyleServicesHandle;
begin
self.font := screen.iconfont;
self.PixelsPerInch := screen.PixelsPerInch;
style:=TStyleManager.LoadFromFile(extractfilepath(paramstr(0))+'Dark Outlet Media.vsf');
tstylemanager.SetStyle(style);
end;
New Delphi 10.3 project Applicaton - Manifest - Enable Runtime Themes, DPI Awareness Per Monitor v2 (so default)
Project uses
Vcl.Styles,
Vcl.Styles.Hooks,
Vcl.Styles.Utils.Forms,
Vcl.Styles.Utils.StdCtrls,
Vcl.Styles.Utils.ComCtrls,
Vcl.Styles.Utils.ScreenTips,
Vcl.Styles.Utils.SysControls,
Vcl.Styles.Utils.SysStyleHook,
Vcl.Styles.Utils.Shadow,
Vcl.Styles.FormStyleHooks
MainForm has
procedure TForm24.FormCreate(Sender: TObject);
var Style : TStyleManager.TStyleServicesHandle;
begin
self.font := screen.iconfont;
self.PixelsPerInch := screen.PixelsPerInch;
style:=TStyleManager.LoadFromFile(extractfilepath(paramstr(0))+'Dark Outlet Media.vsf');
tstylemanager.SetStyle(style);
end;
First if we run this app on HIGH DPI we get:
Look at the caption
Look at the caption - form caption is not visible at all - font size is too big and overloads caption area.
If we add following code at the FormCreate then the main app and all other captions look weard
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
StyleDPIAwareness.Parent := Self;
New Delphi 10.3 project Applicaton - Manifest - Enable Runtime Themes, DPI Awareness Per Monitor v2 (so default)
Project uses
Vcl.Styles,
Vcl.Styles.Hooks,
Vcl.Styles.Utils.Forms,
Vcl.Styles.Utils.StdCtrls,
Vcl.Styles.Utils.ComCtrls,
Vcl.Styles.Utils.ScreenTips,
Vcl.Styles.Utils.SysControls,
Vcl.Styles.Utils.SysStyleHook,
Vcl.Styles.Utils.Shadow,
Vcl.Styles.FormStyleHooks
MainForm has
procedure TForm24.FormCreate(Sender: TObject);
var Style : TStyleManager.TStyleServicesHandle;
begin
self.font := screen.iconfont;
self.PixelsPerInch := screen.PixelsPerInch;
style:=TStyleManager.LoadFromFile(extractfilepath(paramstr(0))+'Dark Outlet Media.vsf');
tstylemanager.SetStyle(style);
end;
First if we run this app on HIGH DPI we get:
Look at the caption
Look at the caption - form caption is not visible at all - font size is too big and overloads caption area.
If we add following code at the FormCreate then the main app and all other captions look weard
StyleDPIAwareness := TStyleDPIAwareness.Create(Self);
StyleDPIAwareness.Parent := Self;
enter image description here
TitleBar on Form Caption heigth is too big, and font is fisible, but I think too big too.
First question is I couldnt find a way to set window/form/caption font size, font weight and even font family name. We can set default font for Form, for all controls on form, but not form caption.
Also is there a way to decrease increasing height of the form caption in high dpi - so it is not as big as it is now.
This works fine in Delphi 10.2 with VCLStyles. Doesnt work with Delphi 10.3 with or without VCLStyles.