Hi,
hier noch was zum knobeln:
Delphi-Quellcode:
procedure TDemoForm.ClockTimer(Sender: TObject);
var
r: TRect;
dt: TDateTime;
begin
with Sender as TTimer do
begin
Enabled := False;
dt := Now;
Panel.Caption := TimeToStr(dt);
with Image do
begin
if SecondOf(dt) mod 5 = 0 then
Canvas.FillRect(Canvas.ClipRect);
r := Rect(Random(Width), Random(Height), Random(Width), Random(Height));
Canvas.Ellipse(r);
end;
Interval := 1000 - MilliSecondOf(Now);
Enabled := True;
end;
end;
Grüße vom marabu