2008年9月10日实例方法:C#启动单个实例的方法
直接把代码贴出来给大家参考:
Boolean createdNew; //返回是否赋予了使用线程的互斥体初始所属权 System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 if (createdNew) //赋予了线程初始所属权,也就是首次使用互斥体 { Application.Run(new Form1()); /s/这句是系统自动写的 instance.ReleaseMute...
[阅读全文] [PDF]
1 共1条 分1页