1 个任意控件闪烁的例子

 1 unit Unit1;
 2 
 3 interface
 4 
 5 uses
 6   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
 7   ExtCtrls, StdCtrls;
 8 
 9 type
10   TForm1 = class(TForm)
11     Button1: TButton;
12     Panel1: TPanel;
13     procedure Button1Click(Sender: TObject);
14   private
15     { Private declarations }
16   public
17     { Public declarations }
18   end;
19 
20 var
21   Form1: TForm1;
22 
23 implementation
24 
25 {$R *.DFM}
26 
27 procedure TForm1.Button1Click(Sender: TObject);
28 var    
29 i:integer;   
30 mm,waittime:integer;
31 begin  
32   waittime := 700;   
33  for i:=0 to 4 do
34   begin  
35     flashwindow(form1.handle,true);   
36     button1.Caption := ' TEST < . . > ' + inttostr(i) +'  ' ;   
37         panel1.Color := clYellow ;   
38         panel1.Font.Size := 40;   
39         panel1.Font.Color := clred;
40         panel1.Caption := '';   
41     application.ProcessMessages;   
42     sleep( waittime );
43     flashwindow(form1.handle,false);   
44     button1.Caption := ' TEST <  @ @ >' + inttostr(i)+'  ' ;   
45         panel1.Color := clFuchsia;   
46         panel1.Font.Size := 40;   
47         panel1.Font.Color := clblue;   
48         panel1.Caption := '';   
49     application.ProcessMessages;
50     sleep( waittime );   
51   end;   
52 end;
53 end.
54 

 

转载于:https://www.cnblogs.com/heimei/archive/2010/01/05/1639914.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值