【文件属性】:
文件名称:好用的自定义验证控件
文件大小:7KB
文件格式:TXT
更新时间:2015-07-11 11:06:58
RegularExpressions
public static bool ControlCheckOutNull(System.Windows.Forms.Control ctrl, string targt, System.Windows.Forms.ToolTip t)
{
if (string.IsNullOrEmpty(targt))
{
t.ForeColor = System.Drawing.Color.Red;
t.Show("此项不能为空!", ctrl, 2000);
ctrl.Focus();
return false;
}
return true;