gkket 发表于 2021-9-12 15:36:21

Winform 防止程序重复打开

Winform 防止程序重复打开using System;
using System.Windows.Forms;
using System.Threading;

namespace Test
{
    static class Program
    {
      /// <summary>
      /// The main entry point for the application.
      /// </summary>
      
      static void Main()
      {
            bool result;
            Application.EnableVisualStyles();
            Mutex m = new Mutex(true, Application.ProductName, out result);
            if (result)
            {
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainFrom());
            }
      }
    }
}



柳下风来 发表于 2021-9-12 15:43:11

看这种帖子就要有种“雾里看花”的意境。

柳下风来 发表于 2021-10-3 20:52:32

激动人心,无法言表!

lichongbin 发表于 2025-11-14 04:38:16

这波分析到位,逻辑满分!

wx_XX2aYPRl 发表于 2025-11-14 04:53:46

我先占个楼,等下再慢慢看~

阿&沐 发表于 2025-11-14 04:53:50

画面感太强了,仿佛身临其境!

daxiaoya 发表于 2025-11-14 05:07:27

学到了学到了,这波分享太实用啦!

chenyi 发表于 2025-11-14 05:27:43

这逻辑绝了,分析得太到位了吧

silva 发表于 2025-11-14 07:12:48

求个链接 / 教程,楼主好人一生平安~

TCB 发表于 2025-11-14 09:12:54

谁懂啊!这内容我能循环看十遍
页: [1] 2
查看完整版本: Winform 防止程序重复打开