Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
Turbo Delphi für Win32
|
Re: Delphi Stopuhr
17. Jul 2005, 12:09
start:=GetTickCount;
Also sowas in der Art:
Delphi-Quellcode:
interface
//...
var start: Cardinal=0;
//...
implementation
//...
procedure Button1Click(Sender: TObject);
begin
if start=0 then
begin
start:=GetTickCount;
Button1.caption:='Stopp';
label1.caption:='';
end
else
begin
Button1.Caption:='Start';
start:=0;
label1.caption:=inttostr(round((GetTickCount-start)/1000)))+' Sekunden verstrichen.';
end;
end;
//...
end.
Manuel Eberl „The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
|