//Recepcao private void btnRecepcao_Click() { string nRec = string.Empty; if (go) if (cklbFuncao.GetItemChecked(3)) { txtLog.Text += "Método: cte.CTeRecepcao\r\n"; str = "#RETORNO: " + cte.CTeRecepcao(pathLote) + "\r\n\r\n"; go = true; string[] t; if (str.IndexOf("sucesso") > 0) { t = str.Split(Convert.ToChar("#")); nRec = t[2].Trim(); //numero de recibo } txtLog.Text += str; Application.DoEvents(); } }