var
Form1: TForm1;
yy,mm,dd:word;
hh,mn,sec,msec:word;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
if button1.Caption='Run' then button1.Caption:='Stop'
else if button1.Caption='Stop' then button1.Caption:='Run';
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if button1.Caption='Stop' then
begin
DecodeDate(Date,yy,mm,dd);
DecodeTime(Time,hh,mn,sec,msec);
label1.Caption:=inttostr(yy)+'/'+inttostr(mm)+'/'+inttostr(dd);
label2.Caption:=timetostr(Time);
ProgressBar1.Position:=hh;
ProgressBar2.Position:=mn;
ProgressBar3.Position:=sec;
end;
end;