Einzelnen Beitrag anzeigen

Benutzerbild von DeddyH
DeddyH

Registriert seit: 17. Sep 2006
Ort: Barchfeld
27.542 Beiträge
 
Delphi 11 Alexandria
 
#20

Re: Kreuzung - Timer funktioniert nicht

  Alt 4. Nov 2009, 20:26
Wird das jetzt wieder so ein "negative Zahlen"-Thread? Zum besseren Verständnis hier mein Timer-Ereignis noch einmal in längerer Form:
Delphi-Quellcode:
procedure TFormAmpel.Timer1Timer(Sender: TObject);
begin
  case FZustand of
    azRot : FZustand := azGelbRot;
    azGelbRot: FZustand := azGruen;
    azGruen : FZustand := azGelb;
    azGelb : FZustand := azRot;
  end;
  if (FZustand = azRot) or (FZustand = azGelbRot) then
    shpRot.Visible := true
  else
    shpRot.Visible := false;
  if (FZustand = azGelb) or (FZustand = azGelbRot) then
    shpGelb.Visible := true
  else
    shpGelb.Visible := false;
  if FZustand = azGruen then
    shpGruen.Visible := true
  else
    shpGruen.Visible := false;
end;
Ist das so verständlicher?
Detlef
"Ich habe Angst vor dem Tag, an dem die Technologie unsere menschlichen Interaktionen übertrumpft. Die Welt wird eine Generation von Idioten bekommen." (Albert Einstein)
Dieser Tag ist längst gekommen
  Mit Zitat antworten Zitat