登陆窗体跳转主窗体时关闭

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace DemoRF
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            frmLogin login = new frmLogin();
            login.ShowDialog();
            if (login.DialogResult == DialogResult.OK)
            {
                Application.Run(new frmMain());
            }
            //Application.Run(new Form2());
        }
    }
}

posted on 2012-10-25 14:20  酒歌  阅读(237)  评论(0编辑  收藏  举报