软件重复启动判断

bool bCreatNew;
Mutex mu = new Mutex(false, Application.ProductName, out bCreatNew);
if (!bCreatNew)
{
MessageBox.Show(Application.ProductName + "已经运行,请勿重复启动软件!", "Meinolf", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}

posted @ 2022-08-26 13:30  b小青青  阅读(38)  评论(0编辑  收藏  举报