WinForm学习
liushengmz
生活是无奈。。无奈的是生活。。。。看淡一切。。。。看清一切。。。。
展开
-
为dataGridView增加一个鼠标经过时高亮的效果
我们在做项目时,记得要用自己的控件, 不要直接就用微软的控件,这样子就算有什么东西要增加修改时, 也可以做到统一修改和增加 现在就实现继承dataGridView鼠标经过时高亮显示 代码如下 class GridView : System.Windows.Forms.DataGridView { #region Andy原创 2009-09-30 14:27:00 · 1126 阅读 · 0 评论 -
为ComboBox增加Value值
在WinForm中不像Web中,ComboBox(WinForm)和DropDownList(Web)中和Item 不一样,WinForm中不可以直接添加Item的Value值,但是Web中可以。 现在这里写一个ComboBox大概可以实现添加Value值 class DropDownList:System.Windows.Forms.ComboBox {原创 2009-10-07 14:48:00 · 1684 阅读 · 0 评论 -
更改Panel、Groupbox边框颜色
加入Panel的paint事件, 加入代码 ControlPaint.DrawBorder(e.Graphics, panel2.ClientRectangle, Color.Red, ButtonBorderStyle.Solid); GroupBox同样private void groupBox1_Paint(object sender, PaintEvent原创 2009-12-18 10:34:00 · 3889 阅读 · 1 评论