I want to close my login form and open Main form!
i do that like this!
private void btnLoginOk_Click(object sender, EventArgs e)
{
if (textBox2.Text == "acer")
{
Main frmMain = new Main();
frmMain.Show();
this.Close();
}
else
{
MessageBox.Show("Invalid Username or Password", "Login Error", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
But My mainForm also close in this code.what i do now?