随笔分类 -  关于WinForm控件

ASP函数大全
摘要:Abs(number) 返回绝对值。 Array(arglist) 创建一个数组。 Asc(string) 返回字符串第一个字符的ANSI码。 Atn(number) 返回反正弦值。 CBool (expression) 转换成Boolean数据类型变量。 CByte (expression) 转换成Byte数据类型变量。 CCur (expression) 转换成Currency数据类型变量。 ... 阅读全文

posted @ 2009-01-02 16:53 VictorShan 阅读(167) 评论(0) 推荐(0)

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

posted @ 2008-09-04 01:30 VictorShan 阅读(689) 评论(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 阅读(525) 评论(0) 推荐(0)

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

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

用TextBox绑定网格
摘要://矩形帮定cb与网格方法 public void f1(object sender, EventArgs e) { this.comboBox1.Text = dataGridView1.CurrentCell.Value.ToString(); Rectangle R = dataGridView1.GetCell... 阅读全文

posted @ 2008-09-02 00:26 VictorShan 阅读(423) 评论(0) 推荐(0)

winform文本框即输即选
摘要:private void textBox2_TextChanged( object sender, EventArgs e ) { // 文本框即输即选方法一 //this.textBox2.SelectionStart = 0; 可省 this.textBox2.SelectAll(); }... 阅读全文

posted @ 2008-09-02 00:24 VictorShan 阅读(496) 评论(0) 推荐(0)

导航