Dein Code ist aber auch nicht gerade eine Ausgeburt von Schönheit.
Delphi-Quellcode:
procedure TForm1.TimerAuto1Timer(Sender: TObject);
begin
if (auto.top<340) and (SRotB.brush.color=clgreen) then
begin
Auto.Top := auto.Top - 1;
if auto.top < 0 then
auto.top := 390;
end;
end;