C#限制程序重复运行 发表回复 bool ret; System.Threading.Mutex mutex = new System.Threading.Mutex(true, Application.ProductName, out ret); if (!ret) { MessageBox.Show(null, “程序已运行!”, “系统提示”, MessageBoxButtons.OK, MessageBoxIcon.Warning); Application.Exit(); return; }