private void buttonLogar_Click(object sender, EventArgs e) { // Entra no formulario principal if (txtBoxUsuario.Text == "teste" && txtSenha.Text == "teste") { TelaPrincipal frm = new TelaPrincipal(); frm.ShowDialog(); //this.Visible = false; this.Close(); } }