2008年9月4日

ErrorProvider控件的用法

摘要: //在按钮事件里的测试 if (textBox1.Text.Length <= 4) { errorProvider1.BlinkRate = 300; //设置图标的闪烁频率,值越小速度越快 //.AlwaysBlink设置图标总是闪烁。.BlinkIfDifferentEr... 阅读全文

posted @ 2008-09-04 01:30 VictorShan 阅读(684) 评论(0) 推荐(0)

foreach在winform中的小技巧(简单实用)

摘要: //用foreach实现CheckBox的全部选定 foreach(Control co in this.Controls) //co是窗体的一个控件 { if(co is CheckBox) //判断如果co是CheckBox ... 阅读全文

posted @ 2008-09-04 00:46 VictorShan 阅读(520) 评论(0) 推荐(0)

向combooBox中添加颜色选项,选择颜色改变窗体的背影色

摘要: //将下面代码写在窗体加载事件 //用foreach遍历颜色 //ConsoleColor指定定义控制台前景色和背景色的常数 foreach (string color in Enum.GetNames(typeof(ConsoleColor))) { //Foregro... 阅读全文

posted @ 2008-09-04 00:32 VictorShan 阅读(445) 评论(0) 推荐(0)

导航