Thema: Delphi Progressbar zu langsam??

Einzelnen Beitrag anzeigen

Svenkan

Registriert seit: 10. Feb 2007
Ort: Bersenbrück
547 Beiträge
 
Delphi 7 Enterprise
 
#1

Progressbar zu langsam??

  Alt 24. Feb 2008, 19:15
Folgendes Problem: ich habe ein Onlineupdate in meinem Programm. Allerdings ergibt sich das Problem, dass der 'Verbleibend'-Counter eher bei 0 ankommt, als die Progressbar am Ende.

Delphi-Quellcode:
procedure TVPlan_Update.IdHTTP1Work(Sender: TObject; AWorkMode: TWorkMode;
  const AWorkCount: Integer);
var aktuell: Integer;
begin
 Application.ProcessMessages;

 if (GetTickCount - FTime) >= 1000 then
 begin
   Label12.Caption := Format('%.2f KB/s', [(AWorkCount - FBytes) / (GetTickCount - FTime)]);
   FTime := GetTickCount;
   FBytes := AWorkCount;
 end;

 Fortschritt.Position:=AWorkCount;

 aktuell:=Round((Fortschritt.Max-AWorkCount)/1024);

  if aktuell>1024 then
   Label10.Caption:=FloatToStr(RoundTo((aktuell/1024),-2))+' MB ('+FloatToStr(Round((AWorkCount/Fortschritt.Max)*100))+' %)'
  else
   Label10.Caption:=IntToStr(aktuell)+' KB ('+FloatToStr(Round((AWorkCount/Fortschritt.Max)*100))+' %)';
end;
Sven Kannenberg
  Mit Zitat antworten Zitat