unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
TForm1 = class(TForm)
Timer1: TTimer;
Image1: TImage;
procedure Timer1Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
MyTime:Integer;
implementation
{$R *.DFM}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if MyTime>120 then begin
image1.Canvas.Rectangle(0,0,Width,height);
image1.Canvas.MoveTo(10,10);
image1.Canvas.LineTo(10,260);
image1.Canvas.LineTo(250,260);
image1.Canvas.MoveTo(10,260);
MyTime:=1;
Randomize;
end;
image1.Canvas.LineTo(10+2*MyTime,Random(250)+10);
inc(MyTime);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
myTime:=200;
Timer1.Interval:=6000;
end;
end.