gpt4 book ai didi

delphi - 处理模态形式的 flash

转载 作者:行者123 更新时间:2023-12-02 03:37:04 26 4
gpt4 key购买 nike


我创建了自定义表单:BorderStyle is None 并使用一种形状作为标题背景。
当此表单显示 Modal 且用户在父窗口中单击时,我想模拟 Flash 表单。
例如,在闪烁表单时更改此形状的填充颜色。
使用表单的 ActivateDeActivate 事件,仅在我的应用程序中以及在表单之间切换时有效。

最佳答案

我找到了答案:

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com