c#中让Windows窗体只运行一次,并在第二次启动窗体时激活该窗体
摘要:我曾经用过Mutex的方法来实现窗体的互斥运行。。但是会出现失效混乱的情况,令我苦恼不已。Mutex的方法如下:using System.Threading; bool Create; Mutex m =new Mutex( false, "name", outCreate );if(Create ) Application.Run(new FormName());我想出了这样一个办法:1.在主窗...
阅读全文
posted @
2007-06-19 09:44
王鲁彬
阅读(2571)
推荐(0)
窗随鼠动
摘要:命名空间using System.Runtime.InteropServices;DLL调用[DllImport("user32.dll")]public static extern bool ReleaseCapture();[DllImport("user32.dll")]public static extern bool SendMessage(IntPtr hwnd, int wMsg, ...
阅读全文
posted @
2007-06-17 18:25
王鲁彬
阅读(196)
推荐(0)