摘要: 匹配中文字符的正则表达式: [\u4e00-\u9fa5]匹配双字节字符(包括汉字在内):[^\x00-\xff]匹配空白行的正则表达式:\n\s*\r匹配HTML标记的正则表达式:<(\S*?)[^>]*>.*?</\1>|<.*? />匹配首尾空白字符的正则表达式:^\s*|\s*$匹配Email地址的正则表达式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*匹配网址URL的正则表达式:[a-zA-z]+://[^\s]*匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][ 阅读全文
posted @ 2011-04-10 10:36 surfshark 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Control是创建一个新的控件,自定义外观及行为 UserControl是由已有的控件组合出一个新的控件UserControl继承Control 继承关系: System.Object System.MarshalByRefObject System.ComponentModel.Component System.Windows.Forms.Control System.Windows.Forms.ScrollableControl System.Windows.Forms.ContainerControl System.Windows.Forms.UserControl 继承Control 阅读全文
posted @ 2011-04-10 08:07 surfshark 阅读(829) 评论(0) 推荐(1) 编辑
摘要: 有很多的朋友搞不清楚Component与Control之间的区别,比较简单形象的区别有下面两点: 1、Component在Run Time时不能呈现UI,而Control可以在Run Time时呈现UI(但是vs 2005里的asp.net中的SqlDataSource是Control,但是它不能呈现UI)。 2、Component是贴在容器Container上的,而Control则是贴在Windows Form或者Web Form上的。 举例来说,SqlCommand是个Component,DataGrid则是一个Control。 那我们又如何来开发一个Component呢?其实很简单,只. 阅读全文
posted @ 2011-04-10 07:54 surfshark 阅读(416) 评论(0) 推荐(0) 编辑