try
{
   frmLogin a = new frmLogin();
   a.ShowDialog();
   frmMain b = new frmMain();
   b.ShowDialog();
}
catch {}