idhttp Post Progress

Giganews Newsgroups
Subject: idhttp Post Progress
Posted by:  Lance Ras (lan…@cdesoftware.com)
Date: Wed, 18 Jan 2006

I couldn't locate any other references to this:

I'm doing an idhttp.post to upload a file.

How can I do a progress meter on this?

I did set up the following:

procedure TFrmInternet.IdHTTP1WorkBegin(ASender: TObject;
    AWorkMode: TWorkMode; AWorkCountMax: Integer);
begin
    Progress.position := 0;
    Progress.Max:=AWorkCountMax;
    application.ProcessMessages;
end;

procedure TFrmInternet.IdHTTP1Work(ASender: TObject;
    AWorkMode: TWorkMode; AWorkCount: Integer);
begin
    Progress.position := AWorkCount;
    application.ProcessMessages;
end;

procedure TFrmInternet.IdHTTP1WorkEnd(ASender: TObject;
    AWorkMode: TWorkMode);
begin
    Progress.position := 0;
    application.ProcessMessages;
end;

Thanks for any assist.

Lance

Replies