摘要: 使用线程互斥变量. 通过定义互斥变量来判断是否已运行实例.C#实现如下:把program.cs文件里的Main()函数改为如下代码:static void Main(){bool runone;System.Threading.Mutex run = new System.Threading.Mutex(true, "jiaao_test", out runone);if (runone){run.ReleaseMutex();Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDef 阅读全文
posted @ 2011-06-10 11:14 王元勋 阅读(350) 评论(0) 推荐(1) 编辑