IdSMTP and IDPOP3 have an onWork event three parameters SMTPWORK (Sender: Tobject; aWorkmode: TWORKMODE; Const AWorkcount: Integer); aworkcount means that you will understand the use of Help. very good. Use. Also engaged in you
/ / Take IndyPOP3 as an example
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;