procedure TForm1.Timer1Timer(Sender: TObject);
begin
  inc(i);
  Label1.Caption := 'Od stratu aplikace ubehlo ' + IntToStr(i) + ' 
sekund.';
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  i := 0;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: 
TCloseAction);
begin
  Timer1.Destroy;
  ShowMessage('      Celkem tedy ' + IntToStr(i) + ' sekund      ');
end;
------------------------------------------------------------
procedure TForm1.FormMouseDown(Sender: TObject; Button: 
TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  kliknuto := true;
  Canvas.Pen.Color := random($02FFFFFF);
  Canvas.MoveTo(X, Y);
end;
------------------------------------------------------------
procedure TForm1.FormCreate(Sender: TObject);
begin
  BitMap1 := TBitMap.Create;
  BitMap1.LoadFromFile('img.bmp');
  BitMap1.Transparent := true;
  Bitmap1.TransparentColor := clWhite;
end;

procedure TForm1.FormMouseDown(Sender: TObject; Button: 
TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Canvas.Draw(X-20, Y-25, BitMap1);
  if Button = mbRight then MuzesKreslit:=true;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; 
X,
  Y: Integer);
begin
  if MuzesKreslit then Canvas.Draw(X-20, Y-25, BitMap1);
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  MuzesKreslit:=false;
end;
