//========================================================= private void btnLocalizar_Click(object sender, EventArgs e) { var form = new frmConsultaCurso(); form.ShowDialog(); if (form.codigo != "") { string periodo = Ferramentas.ConvertePeriodo(form.periodo); txbDescricao.Text = form.descricao; txbCodCurso.Text = form.codigo; cobPeriodo.Text = periodo; alteraBotoes(3); } else { LimpaTela(); alteraBotoes(1); } form.Dispose(); }