INDY's SMTP and POP3 how to achieve progress bars during mail

xiaoxiao2021-03-05  23

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;

转载请注明原文地址:https://www.9cbs.com/read-33196.html

New Post(0)