private void btnInicio_Click(object sender, EventArgs e) { this.Hide(); var inicio = new frmIncio(); inicio.Closed += (s, args) => this.Close(); inicio.Show(); }
private void btnVoltar_Click(object sender, EventArgs e) { this.Hide(); var menu = new frmIncio(); menu.Closed += (s, args) => this.Close(); menu.Show(); }
private void btnEntrar_Click(object sender, EventArgs e) { if (txtNome.Text == "admin" && txtSenha.Text == "admin") { Program.globalString = txtNome.Text; this.Hide(); var inicio = new frmIncio(); inicio.Closed += (s, args) => this.Close(); inicio.Show(); } else { lblErro.Visible = true; txtNome.Text = ""; txtSenha.Text = ""; txtNome.Focus(); } }