unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
TForm1 = class(TForm)
Shape1: TShape;
Shape2: TShape;
Shape3: TShape;
Timer1: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Bevel1: TBevel;
procedure Timer3Timer(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Timer3Timer(Sender: TObject);
begin
timer1.Enabled:=true;
timer3.Enabled:=false;
timer2.Enabled:=false;
shape3.Brush.Color:=clgray;
shape1.Brush.Color:=clred;
shape2.Brush.Color:=clgray;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
timer2.Enabled:=true;
timer3.Enabled:=false;
timer1.Enabled:=false;
shape1.Brush.Color:=clgray;
shape2.Brush.Color:=clyellow;
shape3.Brush.Color:=clgray;
end;
procedure TForm1.Timer2Timer(Sender: TObject);
begin
timer1.Enabled:=false;
timer3.Enabled:=true;
timer2.Enabled:=false;
shape3.Brush.Color:=clgreen;
shape2.Brush.Color:=clgray;
shape2.Brush.Color:=clgray;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
timer1.Enabled:=true;
end;
end.