Hie guys!I am developing an application(has 4 forms so far) and I want the Login form to be closed when one is on the Main Form.The application has an option of exiting the system on the Main Form but when I do that the Login Form will still be there..I need your help guys.Here is part of my code
if (dr["UserID"].ToString()==txtID.Text&& dr["UserName"].ToString() == txtUser.Text && dr["Password"].ToString() == txtPass.Text && dr["Station"].ToString() == cmbStation.Text)
{
Login lg = new Login();
lg.Close();
MainForm mfrm = new MainForm();
mfrm.Show();
}