private void btnExit_Click(object sender, EventArgs e) { FrmMenu m = new FrmMenu(); this.Hide(); m.ShowDialog(); }
private void validateCredentials() { if (this.txtUserName.Text == "admin" && this.txtPassword.Text == "123456") { this.Hide(); FrmMenu menu = new FrmMenu(); menu.ShowDialog(); } else { if (this.txtUserName.Text != "admin") { MessageBox.Show("Usuario incorrecto"); this.txtUserName.Clear(); this.txtUserName.Focus(); } else { MessageBox.Show("Contrasena incorrecta"); this.txtPassword.Clear(); this.txtPassword.Focus(); } } }