杯具程序员
为系统而生,为框架而死,为debug奋斗一辈子;
     吃符号的亏,上大小写的当,最后死在需求上。
static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool ret;
            System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret);

            if (ret)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form2());
            }
            else
            {
                MessageBox.Show("本程序已在运行!");
            }
        }
    }
posted on 2011-07-11 17:35  杯具程序员  阅读(256)  评论(0)    收藏  举报