![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
winfrom
xyzhj
这个作者很懒,什么都没留下…
展开
-
DataGridView 绑定不同图片
设定dataGridView1的第2列为DataGridViewImageColumn类型,添加imageList作为图片容器;在DataBindingComplete方法中循环DataGridViewRow: (this.dataGridView1.Rows[i].Cells[2] as DataGridViewImageCell).Value = imageList1.Images原创 2011-06-27 16:15:00 · 1030 阅读 · 0 评论 -
检查程序是否已经启动,避免重复启动同一程序
编辑program.cs文件,加入如下代码//获取欲启动进程名 string strProcessName;strProcessName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;//检查进程是否已经原创 2011-07-13 11:23:49 · 767 阅读 · 0 评论 -
C#判断系统是32位还是64位
判断系统是否是64位的方法有很多。对于C#来说,调用WMI是一种简单易行的方式。我们可以用Win32_Processor类里面的AddressWidth属性来表示系统的位宽。AddressWidth的值受CPU和操作系统的双重影响。具体的值如下面的表格所示:32bit OS64b转载 2011-07-20 10:23:17 · 746 阅读 · 0 评论 -
判断网络是否正常
System.Net.NetworkInformation.Ping oPing = new System.Net.NetworkInformation.Ping();System.Net.NetworkInformation.PingReply oPingReply = oPi原创 2011-07-20 18:02:11 · 390 阅读 · 0 评论 -
获取当前可使用的网卡并检查网卡设置(网卡的IP,网关,子网掩码,DNS,备用DNS信息)
public void GetNetAdapter() { try { ManagementClass mc = new ManagementClass("Win32_N转载 2011-07-20 18:03:51 · 1509 阅读 · 1 评论