问题
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.
回答1:
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;
来源:https://stackoverflow.com/questions/18324571/show-the-window-shadow-when-using-vcl-styles