楚
楚辞
Unregistered / Unconfirmed
GUEST, unregistred user!
窗体上放一个Timer,一个Label ,第1-5秒内label1.caption:='123',第6-10秒内label1.caption:='456',第11-15秒内label1.caption:='abc'第16-20秒内又循环回label1.caption:='123'var Form1: TForm1; i:integer;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);begini:=1;timer1.Interval :=5000;timer1.Enabled := true;label1.Caption :='123';end;procedure TForm1.Timer1Timer(Sender: TObject);begin case i mod 3 of 0: begin label1.Caption :='123' ;inc(i); end; 1: begin label1.Caption :='456';inc (i); end; 3: begin label1.Caption :='abc';inc(i); end;end; end;