C# 用Mutex或进程限制一台电脑上同时打开多个实例 纵一苇之所如

private void Form1_Load(object sender, EventArgs e)
        {
            bool requestInitialOwnership = true;

            bool mutexWasCreated;
            System.Threading.Mutex m = new System.Threading.Mutex(requestInitialOwnership, Application.ProductName, out mutexWasCreated);
            if ( !mutexWasCreated)
            {
                Application.Exit();

            }

}

原文地址:https://www.cnblogs.com/panjinzhao/p/3152027.html