01-04-2015, 05:24 PM
rabihpascal كتب :اخي الكريم لدي اربع shape على بانل كيف يتغير لونهم واحد تلو الاخر الى اللون الاخضر من ضمن نفس الانترفال اي قبل ان ينتهي اول زمن
استخدم هذا الكود
في اي حدث
كود :
var
i : Integer;
begin
btn2.Enabled := False;
for i := 0 to 40 do
begin
Application.ProcessMessages;
Sleep(2);
case i of
0: begin
shp1.Brush.Color := clGreen;
shp2.Brush.Color := clWhite;
shp3.Brush.Color := clWhite;
shp4.Brush.Color := clWhite;
end;
10: begin
shp1.Brush.Color := clWhite;
shp2.Brush.Color := clGreen;
shp3.Brush.Color := clWhite;
shp4.Brush.Color := clWhite;
end;
20: begin
shp1.Brush.Color := clWhite;
shp2.Brush.Color := clWhite;
shp3.Brush.Color := clGreen;
shp4.Brush.Color := clWhite;
end;
30: begin
shp1.Brush.Color := clWhite;
shp2.Brush.Color := clWhite;
shp3.Brush.Color := clWhite;
shp4.Brush.Color := clGreen;
end;
end;
end;
btn2.Enabled := True;
end;
سبحان الله و بحمده سبحان الله العظيم

