procedure TForm1.Button1Click(Sender: TObject);
begin
if Shape2.Brush.Color=clred then
begin
Shape2.Brush.Color:=clwhite;
Shape3.Brush.Color:=clyellow;
Shape4.Brush.Color:=clwhite;
end
else if Shape3.Brush.Color=clyellow then
begin
Shape2.Brush.Color:=clwhite;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.Color:=clgreen;
end
else if Shape4.Brush.Color=clgreen then
begin
Shape2.Brush.Color:=clred;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.color:=clwhite;
end
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
CLOSE
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Shape1.Brush.color:=clblack;
Shape2.Brush.Color:=clRed;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.Color:=clwhite;
end;
end.
begin
if Shape2.Brush.Color=clred then
begin
Shape2.Brush.Color:=clwhite;
Shape3.Brush.Color:=clyellow;
Shape4.Brush.Color:=clwhite;
end
else if Shape3.Brush.Color=clyellow then
begin
Shape2.Brush.Color:=clwhite;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.Color:=clgreen;
end
else if Shape4.Brush.Color=clgreen then
begin
Shape2.Brush.Color:=clred;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.color:=clwhite;
end
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
CLOSE
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Shape1.Brush.color:=clblack;
Shape2.Brush.Color:=clRed;
Shape3.Brush.Color:=clwhite;
Shape4.Brush.Color:=clwhite;
end;
end.
No comments:
Post a Comment