使用VCL样式时显示窗口阴影 [英] Show the window shadow when using VCL styles
本文介绍了使用VCL样式时显示窗口阴影的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用VCL样式时,是否可以按照常规Windows 7形式显示窗口阴影?
Is there a way to show the window shadow, as per normal Windows 7 forms, when using a VCL style?
我了解样式中的位图和设置会替换表单边框,但是阴影不是受样式影响的区域之外的某种alpha混合/航空对象吗?
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?
将CS_DROPSHADOW添加到WindowClass.Style似乎无效.
Adding CS_DROPSHADOW to the WindowClass.Style seems to have no effect.
推荐答案
使用CS_DROPSHADOW样式很好
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;
这篇关于使用VCL样式时显示窗口阴影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文