[winform]如何给dataGridView行前小图标? 如图所示的主键小图标? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我从SQL SERVER 里抓的图,我是指,自己设计WINFORM时,使用DATAGRIDVIEW如何实现这样的效果? private void dataGridView1_Paint(object sender, PaintEventArgs e) { DataGridView _View = (DataGridView)sender; if (_View.Columns.Count == 0 || _View.RowCount == 0) return; Rectangle _ColRectangle = dataGridView1.GetCellDisplayRectangle(0, 0, true); e.Graphics.DrawIcon(this.Icon, new Rectangle(0, _ColRectangle.Y, _ColRectangle.X, _ColRectangle.Height)); }看看这样 能达到要求不 晕~~有点花..改下 DataGridView _View = (DataGridView)sender; if (_View.Columns.Count == 0 || _View.RowCount == 0) return; Rectangle _ColRectangle = dataGridView1.GetCellDisplayRectangle(0, 0, true); if (_ColRectangle.X == 0 || _ColRectangle.Y == 0) return; e.Graphics.DrawIcon(this.Icon, new Rectangle(0, _ColRectangle.Y, _ColRectangle.X, _ColRectangle.Height)); VS平台插件开发,怎样将制作的插件加入到VS的右键菜单里面? 我想用wcf来实现数据同步(外网),给点建议撒 如何做这样的数据比较? visual studio 2010连接了数据库,能查询,但不能插入数据 求 .net项目规划管理之类的电子教程 或 书籍 C#有两种吗: C#与C#.net? 怎样写水平滚动条的有关程序? XmlElement 元素和XmlNode 类 节点,之间怎么区分呀? 如何让带滚动条的文本框显示在滚动条的最低端? Autofac泛型接口注入问题 在窗体A中如何访问窗体B中的TextBox控件中的文本 DatagridView 小数点位数控制?
{
DataGridView _View = (DataGridView)sender;
if (_View.Columns.Count == 0 || _View.RowCount == 0) return; Rectangle _ColRectangle = dataGridView1.GetCellDisplayRectangle(0, 0, true); e.Graphics.DrawIcon(this.Icon, new Rectangle(0, _ColRectangle.Y, _ColRectangle.X, _ColRectangle.Height));
}
看看这样 能达到要求不
if (_View.Columns.Count == 0 || _View.RowCount == 0) return; Rectangle _ColRectangle = dataGridView1.GetCellDisplayRectangle(0, 0, true);
if (_ColRectangle.X == 0 || _ColRectangle.Y == 0) return;
e.Graphics.DrawIcon(this.Icon, new Rectangle(0, _ColRectangle.Y, _ColRectangle.X, _ColRectangle.Height));