Информатика. Программирование в Delphi
256
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
dec(AHour);
if AHour<0 then
AHour:=23;
if AHour<10 then
Label2.Caption:='0'+IntToStr(AHour)
else
Label2.Caption:=IntToStr(AHour)
end;
procedure TForm1.BitBtn3Click(Sender: TObject);
begin
inc(AMin);
if AMin>59 then
AMin:=0;
if AMin<10 then
Label3.Caption:='0'+IntToStr(AMin)
else
Label3.Caption:=IntToStr(AMin)
end;
procedure TForm1.BitBtn4Click(Sender: TObject);
begin
dec(AMin);
if AMin<0 then
AMin:=59;
if AMin<10 then
Label3.Caption:='0'+IntToStr(AMin)
else
Label3.Caption:=IntToStr(AMin)
end;
procedure TForm1.BitBtn5Click(Sender: TObject);
begin
inc(ASec);
if ASec>59 then
ASec:=0;
if ASec<10 then
Label4.Caption:='0'+IntToStr(ASec)
else
Label4.Caption:=IntToStr(ASec)
end;