Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Apr : IdHTTP and progress

www.cryer.info
Managed Newsgroup Archive

IdHTTP and progress

Subject:IdHTTP and progress
Posted by:"Grega Loboda" (grega.lobo..@email.si)
Date:Tue, 5 Apr 2005 12:30:06

I had three events with Indy 8:

procedure TNadgradiForm.IdHTTPWorkBegin(Sender: TObject; AWorkMode:
TWorkMode; const AWorkCountMax: Integer);
begin
  Gauge2.Progress := 0;
  Gauge2.MaxValue := IdHTTP.Response.ContentLength;

  Gauge3.Progress := 0;
  Gauge3.MaxValue := IdHTTP.Response.ContentLength;
end;

procedure TNadgradiForm.IdHTTPWorkEnd(Sender: TObject; AWorkMode:
TWorkMode);
begin
  Gauge2.Progress := Gauge2.MaxValue;
  Gauge3.Progress := Gauge3.MaxValue;
  Gauge1.Progress := Gauge1.Progress + Gauge2.MaxValue;
end;

procedure TNadgradiForm.IdHTTPWork(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
  Gauge2.Progress := AWorkCount;
  Gauge3.Progress := AWorkCount;
end;

Everything was ok. In version 9, I only get OnWorkBegin called once. That
vents is not even in the help. So, how to show a progress?

Replies:

www.cryer.info
Managed Newsgroup Archive