C#控件系类

<p align="left">组件. errorProvider</p>

<p align="left">2、错误提示</p>

 

<p align="left">epProvider.SetError(txtGUID, "GUID数量只能为整数,请输入大于零的整数!");

 //焦点定位到错误处

txtGUID.Focus();

//选择输入的错误

 txtGUID.SelectAll();

<p align="left">同时我们也可以对ErrorProvider进行相关的设定。</p>

<p align="left"><!--more--></p>

 

<p align="left"> #region 定义ErrorProvider的相关属性

//BlinkStyle:取得或设定错误图示闪烁的速率。

epProvider.BlinkStyle = ErrorBlinkStyle.BlinkIfDifferentError;

//BlinkRate:取得或设定数值,表示错误图示何时闪烁。

epProvider.BlinkRate =50;

#endregion

<p align="left"><a href="http://www.cnblogs.com/flyingfish/archive/2008/05/28/1209291.html">参见</a></p>

<p align="left"><a href="http://www.cnblogs.com/flyingfish/archive/2008/05/28/1209291.html"></a></p>

<p align="left"> Tooltip</p>

<p align="left">this.toolTip1.SetToolTip(this.textBox1,"清输入学生姓名。");</p>

<p align="left">  this.toolTip1.SetToolTip(this.textBox2,"请输入学生年龄。");</p>

<p align="left"> this.toolTip1.SetToolTip(this.textBox3,"请输入身份证号码。");</p>

<p align="left"> this.toolTip1.SetToolTip(this.textBox4,"请输入联系地址。");</p>

<p align="left">this.toolTip1.SetToolTip(this.label3,"居民身份证号码信息输入提示。");</p>

<p align="left"> this.toolTip1.SetToolTip(this.label4,"联系地址信息输入提示。");                  </p>

<p align="left"><a href="http://tech.ddvip.com/2008-11/122593413889440.html">参考</a></p>

<p align="left"> Menustrip</p>

<p align="left">静态的可以直接添加其中可以设置选中图片 快捷键</p>

<p align="left"><a href="http://q.sohu.com/forum/5/topic/2606915">参见</a></p>

<p align="left"> OpenFileDialog </p>

 

<a href="http://blog.csdn.net/yunhaiC/archive/2009/03/11/3980947.aspx">参见</a>

 

SaveFileDialog

 

<a href="http://www.zxbc.cn/html/20080317/32501.html">参见</a>

 

ImageList

 

ImageList组件就是一个图像列表。一般情况下,这个属性用于存储一个图像集合,这些图像用作工具栏图标或TreeView控件上的图标。许多控件都包含ImageList属性。这个属性一般和ImageIndex属性一起使用。ImageList属性设置为ImageList组件的一个实例,ImageIndex属性设置为ImageList中应在控件中显示的图像的索引。使用ImageIndex.Images属性的Add方法可以把图像添加到ImageList组件中。Images属性返回一个ImageCollection。

 

两个最常用的属性是ImageSize和ColorDepth。ImageSize使用Size结构作为其值。其默认值是16×16,但可以取1~256之间的任意值。ColorDepth使用ColorDepth枚举作为其值。颜色深度值可以从4位~32位。在.NET Framework 1.1中,默认是ColorDepth.Depth8Bit。

 

ContextMenuStrip

 

鼠标右键点击出来的菜单

 

<a href="http://www.zxbc.cn/html/20080621/57630.html">参考</a>

 

Toolstrip

 

工具栏的项目

 

<a href="http://book.51cto.com/art/200901/105509.htm">参考</a>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章