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
王鲁彬
阅读(2574)
推荐(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)
C#2005 获取DataGridView选中行的值
摘要:Visual Studio 2005 中DataGrid变成了DataGridView,其中的一些属性和方法都有所改变,一个个属性看下来,总算找到了。。嘿^_^ String str = this.DataGridView.SelectedCells[0].Value.ToString();
阅读全文
posted @
2007-06-14 23:27
王鲁彬
阅读(16053)
推荐(0)