hab jetzt noch nicht seht weit reingesehn, aber schon in der ersten Datei ...
Delphi-Quellcode:
procedure TForm1.UpdateProgressbar(Sender: TObject; Cur: Integer; Max: Int64);
begin
ProgressBar1.Max := 100;
ProgressBar1.Position := Round((Cur / Max)*100);
Form1.Caption := IntToStr(ProgressBar1.Position) + ' % ' + Format('Speed: %3.3f Sec.', [(GetTickCount - Tick)/1000]);
end;
Delphi-Quellcode:
// warum war Cur als Integer und Max als Int64?
// bei Dateien über 2 GB wäre Cur wohl etwas überlastet
procedure TForm1.UpdateProgressbar(Sender: TObject;
const Cur, Max: Int64);
begin
// kann man auch einmal direkt im OI zuweisen
//ProgressBar1.Max := 100;
// weiß jetzt nur nicht was schneller ist,
// aber vermutlich doch die in der FPU, als emulierten 64-Bit-Operationen ...
// hab also nix gesagt ._.
ProgressBar1.Position := (Cur * 100)
div Max * 100;
// wenn eh schon Format da ist, warum nicht gleich weiternutzen ;)
Form1.Caption := Format('
%d%% Speed: %3.3f Sec.', [ProgressBar1.Position, (GetTickCount - Tick) / 1000]);
end;
Ein Therapeut entspricht 1024 Gigapeut.