How to disable VCL styles in Delphi

The VCL Styles apply a skin to all of the VCL application, but you can disable the VCL Styles for a particular control class. So if you want disable the VCL Styles for a particular form, you can use the RegisterStyleHook function passing the type of the form and the TStyleHook class which is a empty style hook class.

This line of code will disable the VCL Styles in all the forms of the type TFormChild:

TStyleManager.Engine.RegisterStyleHook(TFormChild, TStyleHook);

Now, if you run this code all controls of the form, TFormChild will still painted with the VCL Styles, so to fix that you must disable the default Style hook for all the controls of the form using a trick like this

unit uChild;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TButton   = class(Vcl.StdCtrls.TButton); //This declaration is only for disabling the TButton of this form
  TFormChild = class(TForm)
    Button1: TButton;
  private
    { Private declarations }
  public
    { Public declarations }
  end;

and now you can disable the VCL Styles of the TButton of this form as well with this code

TStyleManager.Engine.RegisterStyleHook(uChild.TButton, TStyleHook);

If you want more information about the use of the TStyleHook Class, check the article Exploring Delphi XE2 – VCL Styles Part II.


Removing (uncheck) the seClient option from the StyleElements property of the Splash Form did the trick for me (Delphi XE10).