另一种方法:
var
; Start :Integer;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
; start := start+1;
; if start>=20 then ; //循环
; ; start := 0;
; Button1.Caption := IntTostr(start);
; invalidate;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
; start := 3;
; Timer1.Interval := 80;
; Timer1.Enabled := True;
; Button1.Caption := IntTostr(start);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
; Timer1.Enabled := not Timer1.Enabled; ;//中止循环
end;