C#winform只允许打开一个进程


```csharp
static void Main()
    {
        bool createdNew;
        using(Mutex mutex=new Mutex(true,Application.ProductName,out createdNew))
        {
            if (createdNew)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
            else
            {
                MessageBox.Show("Only One Instance is allowed");
                System.Environment.Exit(1);

            }
        }

    }

上一篇:JAVA后端连接MYSQL 8 报错:Public Key Retrieval is not allowed


下一篇:MySQL报错:Packet for query is too large (2,588 > 2,048).