[STAThread] static void Main() { bool createdNew; Mutex mutex = new Mutex(true, Application.ProductName, out createdNew); if (createdNew) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new FormMain()); mutex.ReleaseMutex(); } else { Application.Exit(); } }
转载于:https://blog.51cto.com/lixia/1974567