我创建了自定义表单:BorderStyle
is None
并使用一种形状作为标题背景。
当此表单显示 Modal
且用户在父窗口中单击时,我想模拟 Flash 表单。
例如,在闪烁表单时更改此形状的填充颜色。
使用表单的 Activate
和 DeActivate
事件,仅在我的应用程序中以及在表单之间切换时有效。
最佳答案
我找到了答案:
type
TForm2 = class(TForm)
shp1: TShape;
public
procedure WMNCActivate(var M: TWMNCActivate); message WM_NCACTIVATE;
end;
procedure TForm2.WMNCActivate(var M: TWMNCActivate);
begin
inherited;
if M.Active then
shp1.Brush.Color:= clLime
else
shp1.Brush.Color:= clBlack;
end;
关于delphi - 处理模态形式的 flash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20034754/