Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show the window shadow when using VCL styles

Is there a way to show the window shadow, as per normal Windows 7 forms, when using a VCL style?

I understand the bitmap and settings in the style replaces the form borders, but isn't the shadow some sort of alpha blend / aero thing that is outside the area affected by the style?

Adding CS_DROPSHADOW to the WindowClass.Style seems to have no effect.

like image 983
SiBrit Avatar asked Oct 27 '25 08:10

SiBrit


1 Answers

Using the CS_DROPSHADOW style works fine

type
  TMyForm = class(TForm)
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  end;

procedure TMyForm.CreateParams(var Params: TCreateParams);
begin
  inherited;
  with Params do
    WindowClass.Style := WindowClass.Style or CS_DROPSHADOW;
end;

enter image description here

like image 170
RRUZ Avatar answered Oct 30 '25 05:10

RRUZ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!