Autor Beitrag
Bockscar
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 105



BeitragVerfasst: Mi 18.01.06 13:37 
Ich möchte dass mein Timer der meine Roulettekugel jeweils bei einmal ausführen EIN FELD weiterführt zwischen 72-144 mal arbeitet und dann beendet => die Kugel liegt irgendwo.

Wie kann ich so eine Begrenzung verwirklichen?
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Mi 18.01.06 13:40 
Ein globale Variable definieren.
Dies mit einer Zufallszahl zwischen 72 und 144 füllen.
Jedesmal wenn der Timer ausgelöst wird, muss der Wert der Variablen um eins reduziert werden.
Ist der Wert "0", dann muss der Timer disabled werden.
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 18.01.06 13:43 
Oder, anstelle einer weiteren globalen Variable: Speichere die Zufallszahl in der Eigenschaft "Tag" des Timers. Rest wie Jasocul beschrieben hat.

_________________
We are, we were and will not be.