i can open another form in the main form but i want when the 2nd form is opened the main form will be closed

Code:
if (OgrenciGiris == null)    //main form is frmPersonelGiris 2nd form is frmOgrenciGiris
                   {
                       PersonelGiris = new frmPersonelGiris();
                       PersonelGiris.Close();
                       OgrenciGiris = new frmOgrenciGiris();
                       OgrenciGiris.Show();
                   }
how can i do that?