//以indyPop3为例
procedure TForm1.IdPOP31WorkBegin(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCountMax: Integer);
begin
progressBar1.Max:=AWorkcountMax;
progressBar1.Position:=0;
end;
procedure TForm1.IdPOP31Work(Sender: TObject; AWorkMode: TWorkMode;
const AWorkCount: Integer);
begin
progressBar1.Position:=AWorkCount;
end;
procedure TForm1.IdPOP31WorkEnd(Sender: TObject; AWorkMode: TWorkMode);
begin
progressBar1.Position:=0;
end;