I have a simple unit with a form and an OnClick even to create a new Form when the main form is clicked.
unit DPS.Main;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, DPS.Materials, System.Generics.Collections, Vcl.ExtCtrls, DPS.ChildForm;
type
TForm6 = class( TForm )
procedure FormClick( Sender : TObject );
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form6: TForm6;
implementation
{$R *.dfm}
procedure TForm6.FormClick( Sender : TObject );
var
Form1 : TForm;
begin
Form1 := TForm.Create( Self );
//Form1.Parent := Self;
Form1.Show();
end;
end.
If I don't assign a parent for the created form I get the default Windows 11 style.
if I uncomment out the line
//Form1.Parent := Self;
I get the sexy Windows 7 lick of paint. Ughh.
This semms to be a default VCL Styles skin, as, surprisingly if I change the appearance to one of the inbuilt VCL styles such as carbon this is not a problem.
Any thoughts on this?