unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Image1: TImage;
Timer1: TTimer;
Label1: TLabel;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
sekunde: Cardinal;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
sekunde := 0;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if (sekunde
mod 60) = 0
then
image1.Canvas.FillRect(Rect(0,0,Image1.Width,Image1.Height));
image1.canvas.ellipse(10 + 6 * (sekunde
mod 60),10,15 + 6 * (sekunde
mod 60),15);
Label1.Caption := Format('
%.2d:%.2d:%.2d',[Succ(sekunde)
div 3600,
Succ(sekunde)
div 60,
Succ(sekunde)
mod 60]);
inc(sekunde);
end;
end.