110,552
社区成员
发帖
与我相关
我的任务
分享
using System.Threading;
static void Main()
{
Mutex m_Mutex = new Mutex(false, "Mutex_Name");
bool opened = false;
opened = m_Mutex.WaitOne(TimeSpan.Zero, false);
if (!opened)
{
MessageBox.Show("任务提醒程序已在运行!");
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}