copy一段
//send之前,置进度为0
procedure Tfrmmail.SakSMTPBeforeSend(Sender: TObject);
begin
frmprogressbar.ProgressBar.Position := 0;
end;
//改变进度条
procedure Tfrmmail.SakSMTPSendProgress(Sender: TObject; Percent: Word);
begin
frmprogressbar.progressbar.Position := percent;
end;
//编码进度
procedure Tfrmmail.SakSMTPEncodeProgress(Sender: TObject; Percent: Word);
begin
frmprogressbar.progressbar.Position := percent;
end;
//开始编码
procedure Tfrmmail.SakSMTPEncodeStart(Sender: TObject; FileName: string;
BytesCount: Integer);
begin
frmprogressbar.progressbar.Position := 0;
frmprogressbar.label_status.Caption := '正在编码' + #13#13 + filename;
StatusBar.Panels[0].Text := 'Encoding ' + FileName + ' of ' + intToStr(BytesCount) + ' bytes';
end;
//解码进度
procedure Tfrmmail.SakPOPDecodeProgress(Sender: TObject; Percent: Word);
begin
frmprogressbar.ProgressBar.Position := percent;
end;
//开始解码
procedure Tfrmmail.SakPOPDecodeStart(Sender: TObject; FileName: string;
BytesCount: Integer);
begin
frmprogressbar.ProgressBar.Position := 0;
end;
//接收进度
procedure Tfrmmail.SakPOPRetrieveProgress(Sender: TObject; Percent: Word);
begin
frmprogressbar.progressbar.Position := percent;
end;