Autor Beitrag
smokydog
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 27.12.03 19:07 
Also mein Prob is ich möchte gerne die intervalzeit in sek in einem label anzeigen. Ich weiss nicht konkrett was ich noch ändern müsste.
Danke
tomtom62
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278

WIN 2000, XP prof
D5 prof.
BeitragVerfasst: Sa 27.12.03 19:10 
ausblenden Delphi-Quelltext
1:
Label1.caption:=inttostr(timer1.interval div 1000);					
Andreas Pfau
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 997



BeitragVerfasst: Mi 31.12.03 16:11 
Hallo,

Das ist aber recht.. grob. 10ms wären einfach Null.

Nimm Format():
ausblenden Delphi-Quelltext
1:
Label1.Caption := Format('%.3fs', [Timer1.Interval / 1000]);					

Da steht "%.3fs". Das "s steht wirklich da. das "%.3f" ist der Format-String. "%" leitet ihn ein. ".3" heißt 3 Kommastellen. "f" ist eine Gleitkommazahl. Am besten in der Onlinehilfe unter "Format-strings" schauen, Format() ist eine mächtige Funktion!

_________________
Life is a bad adventure, but the graphic is really good!