Fórum Email com Progresso !!!! #290055
29/07/2005
0
e como colocar progress no envio da mensagen ??????
vlw !!!!!
Guilherme
Curtir tópico
+ 0Posts
29/07/2005
Saint
cara, vc pode pegar o tamanho do idmessage como arquivo e usar o onwork como referencia para a qtd enviada..
abraco
Gostei + 0
29/07/2005
Guilherme
Gostei + 0
01/08/2005
Guilherme
Gostei + 0
12/08/2005
Christian_adriano
function TamanhoArquivo(Arquivo: string): Integer; begin try Result := 0; with TFileStream.Create(Arquivo, fmOpenRead or fmShareExclusive) do begin try Result := Size; finally Free; end; end; except end; end; // *********** Anexando Arquivos ****************** // tam := 0; ProgressBar1.Position := 0; if (ListBox1.Items.Count > 0) then for i := 0 to ListBox1.Count - 1 do begin TIdAttachment.Create(idMsgSend.MessageParts, ListBox1.Items.Strings[i]); tam := tam + TamanhoArquivo(ListBox1.Items.Strings[i]); end; ProgressBar1.Max := tam;
E no Evento OnWork do TidSMTP vc coloca esse código:
ProgressBar1.Position := AWorkCount;
Espero que ajude.
[]´s.
Christian.
Gostei + 0
15/08/2005
Guilherme
Gostei + 0
17/08/2005
Christian_adriano
ProgressBar1.StepIt;
Espero q ajude...
[]´s.
Christian.
Gostei + 0
18/08/2005
Guilherme
Gostei + 0
02/09/2005
Guilherme
Nao adiantou nada !!!
Gostei + 0
31/03/2009
Powerlog Tecnologia
const cBytesPorMb = 1024 * 1024; var NumMsg, TotMsg: Integer; xTamMsg: extended; begin if not idPOP.Connected then idPOP.Connect(xTimeOut); TotMsg := idPOP.CheckMessages; pbEmail.MaxValue := TotMsg; for NumMsg := 1 to TotMsg do begin xTamMsg := idPOP.RetrieveMsgSize(NumMsg) / cBytesPorMb; (... etc, etc, etc ... ) end; end;
Se a mensagem for maior que ´X´ mega, eu nem baixo, já apago de vez ... (a pedido do cliente, claro)
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)