PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum JvBrowseForFolderDialog - Travando Grid #527172

29/07/2015

0

Galera, alguém sabe me dizer pq este componente trava meu grid depois de confirmar ou cancelar a operação?

O código é simples:

<code>
if JvBrowseForFolderDialog.Execute then
begin
pnlProgresso.Visible := True;
lblMensagemProgresso.Caption := 'Aguarde o término do processamento...';
lblMensagemProgresso.Refresh;
Boletos.Pesquisa.Clear;
Boletos.Pesquisa.NrLtBol := qryLotes.FieldByName('NrLtBol').AsString;
Boletos.Pesquisa.Ordem := '1';
Boletos.Pesquisa.Search;
pbProgresso.Max := Boletos.PesqBoletos.RecordCount;
pbProgresso.Position := 0;
while not Boletos.PesqBoletos.Eof do
begin
pbProgresso.Position := pbProgresso.Position + 1;
lblMensagemProgresso.Caption := 'Gerando boleto: ' + IntToStr( pbProgresso.Position ) + ' de ' + IntToStr( pbProgresso.Max );
lblMensagemProgresso.Refresh;
sNmArquivo := NomeDoArquivo( Boletos.PesqBoletos.FieldByName( 'CdEstab' ).AsString,
Boletos.PesqBoletos.FieldByName( 'NrNota' ).AsString,
Boletos.PesqBoletos.FieldByName( 'NFSeNro' ).AsString,
Boletos.PesqBoletos.FieldByName( 'Texto' ).AsString );
CopyFile( PAnsiChar(Boletos.SalvarBoletos( sNmArquivo )), PAnsiChar(JvBrowseForFolderDialog.Directory + '\' + sNmArquivo+'.jpg'), True);
Boletos.PesqBoletos.Next;
end;
pnlProgresso.Visible := False;
end;
</code>

Obrigado!
Ferefefe88

Ferefefe88

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar