unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ExtCtrls, ComCtrls,Mask, StdCtrls,strutils;
type
  TForm1 = class(TForm)
    CheckBox1: TCheckBox;
    Label1: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    UpDown1: TUpDown;
    UpDown2: TUpDown;
    Timer1: TTimer;
    Timer2: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure UpDown1Click(Sender: TObject; Button: TUDBtnType);
    procedure UpDown2Click(Sender: TObject; Button: TUDBtnType);
    procedure Timer2Timer(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
var
   d,a,b,c:string;
begin
  if checkbox1.Checked then begin
    b:=leftstr(label1.Caption,2);
    c:=midstr(label1.Caption,4,2);
    a:=edit1.Text+':'+edit2.text;
    d:=b+':'+c;
  if d=a then begin
beep
end;
end;
end;
procedure TForm1.UpDown1Click(Sender: TObject; Button: TUDBtnType);
begin
  edit1.text:=inttostr(updown1.Position);
end;
procedure TForm1.UpDown2Click(Sender: TObject; Button: TUDBtnType);
begin
  edit2.text:=inttostr(updown2.Position);
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
  label1.Caption:=timetostr(time);
end;
procedure TForm1.FormActivate(Sender: TObject);
begin
  edit1.Text:=leftstr(timetostr(time),2);
  edit2.Text:=midstr(timetostr(time),4,2);
end;
end.