private void goToMainToolStripMenuItem_Click(object sender, EventArgs e) { this.Hide(); firstForm o = new firstForm(); o.ShowDialog(); }
private void loginbutton_Click(object sender, EventArgs e) { if (authenticated(usernametextBox.Text, passwordtextBox.Text)) { MessageBox.Show("Welcome \t " + usernametextBox.Text + " \t you are Successfully login", "Login", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Hide(); firstForm o = new firstForm(); o.ShowDialog(); saaf(); } else { NewMethod(); MessageBox.Show("Check Username and Password", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); saaf(); } }