procedure TfrmPrincipal.btnCsProcessamentoClick(Sender: TObject); var pathRet : shortstring; begin btnCsProcessamento.enabled:=false; Screen.Cursor:=crAppStart; EditStatus.Text:='Aguarde...'; panel2.Refresh; if (CTeRetRecepcao(EditConsultaProc.text)) then begin pathRet:= ExtractFilePath(ParamStr(0))+'cte\retornos\temp.txt'; //arquivo fixo para retorno de mensagem de consulta de processamento if not (FileExists(pathRet)) then mmoConsultaProcessamento.Text:='Arquivo de retorno não localizado.'+#13+ pathRet else mmoConsultaProcessamento.Lines:=RetornaString(pathRet); end else mmoConsultaProcessamento.Text:='Falha.'; btnCsProcessamento.Enabled:=true; EditStatus.Text:='Concluído.'; Screen.Cursor:=crDefault; end;