private void btnNext_Click_1(object sender, EventArgs e) { this.Hide(); Main_Form f2 = new Main_Form(); f2.ShowDialog(); }
private void btnLogin_Click(object sender, EventArgs e) { String Username = "******"; String Password = "******"; if (txtUser.Text == Username && txtPassword.Text == Password) { if (ValidateChildren(ValidationConstraints.Enabled)) { MessageBox.Show("Login Successful", "Login", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); this.Hide(); Main_Form f2 = new Main_Form(); f2.ShowDialog(); } } else { MessageBox.Show("Please Check your Username and Password", "Login", MessageBoxButtons.OK, MessageBoxIcon.Error); } }