• 0
Sign in to follow this  
Alberto Mota

(Resolvido) Barra progressão ao enviar email

Question

Prezados colegas, estou usando o componente IDSmtp no Delphi 7

e esta enviando o email normalmente.

Gostaria de colocar uma barra de progressão até o término do envio.

O codigo utilizado é esse:

procedure TFrmbackup.BitBtn12Click(Sender: TObject);

var Anexo : Integer;

begin

IdMessage.Recipients.EMailAddresses := edtPara.Text;

IdMessage.Subject := edtAssunto.Text;

IdMessage.Body := mmMensagem.Lines;

//Manipulando os Anexos

for Anexo := 0 to lbxAnexos.Items.Count-1 do

TIdAttachment.Create(idmessage.MessageParts, TFileName(lbxAnexos.Items.Strings[Anexo]));

IdSMTP.Connect;

try

IdSMTP.Send(IdMessage);

finally

IdSMTP.Disconnect;

end;

Application.MessageBox('Email enviado com sucesso!', 'Confirmação',

MB_ICONINFORMATION + MB_OK);

end;

Como coloco a barra de progressão?

Desde já, obrigado.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

exemplo:

metodos do IdSMTP

OnBeginWork

ProgressBar1.Visible:= True;

ProgressBar1.Max:= AWorkCountMax;

OnWork

ProgressBar1.Position:= AWorkCount;

OnWorkEnd

ProgressBar1.Visible:= False;

abraço

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this