摘要: 在Program.cs中添加如下代码: Boolean createdNew; //返回是否赋予了使用线程的互斥体初始所属权 System.Threading.Mutex instance = new System.Threading.Mutex(true, "MutexName", out createdNew); //同步基元变量 if (createdNew) //赋予了线程初始所属权,也... 阅读全文
posted @ 2009-06-09 13:25 lemontree 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 在网上找了两个解决办法:最大的不同点是一个用了父窗体的MdiChildren来作为判断依据,而另一个则是用Application.OpenForms,试了一下都可以,哪天再研究下。第一个,转自:http://www.cnblogs.com/virusswb/ usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel... 阅读全文
posted @ 2009-06-09 11:48 lemontree 阅读(992) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { //打开登录窗口 LoginForm lg = new LoginForm(); if(lg.ShowDialog() == DialogResult.OK) { Application.Run(new MainForm());//打开你指定的窗口 } ... 阅读全文
posted @ 2009-06-09 00:04 lemontree 阅读(1155) 评论(0) 推荐(1) 编辑
摘要: ***************************************************************************************************************************************** SCARBOROUGH FAIR改编自一首十七世纪英格兰民谣,其起源可一直追溯到中世纪。它曾被英国民歌之父麦考选进他编辑的一... 阅读全文
posted @ 2009-06-09 00:00 lemontree 阅读(8705) 评论(0) 推荐(0) 编辑