随笔分类 - 26 .NETWinform
摘要:实际使用 Program.cs代码 //声明一个线程 private static System.Threading.Mutex mutex; /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { A
阅读全文
摘要:前言 判断程序是否已经运行,使程序只能运行一个实例有很多方法,下面记录两种。 目前使用的是第一种方法。 方法1:线程互斥 static class Program { private static System.Threading.Mutex mutex; /// <summary> /// 应用程
阅读全文