标签:
static class Program { private static Mutex onlyOne; /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); onlyOne = new Mutex(true, Process.GetCurrentProcess().ProcessName); if (onlyOne.WaitOne(0, false)) { Application.Run(new frmRelease()); } else { MessageBox.Show("应用程序已启动!"); } } }
标签:
原文地址:http://www.cnblogs.com/zhongxinWang/p/4326494.html