vs里的只能提示框怎么实现的啊? 我也想在我的winform的textbox里实现这种提示,特别是验证数据时在该textbox出显示这种提示框,因为用messagebox太老土了,不知道怎么实现?tooltip好像不好控制 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 有一个ErrorProvider控件,你试试! ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfsystemwindowsformstooltipclasstopic.htm ErrorProvider控件比方说我要验证textbox空间的内容,代码如下 if (rdoStudentID.Checked == true && txtStudentID.TextLength != 9 && txtStudentID.TextLength > 0) { errStudentID.SetIconAlignment((Control)sender, ErrorIconAlignment.MiddleRight); errStudentID.SetError((Control)sender, "学号输入有误"); e.Cancel = true; SystemSounds.Exclamation.Play(); txtStudentID.Text = ""; } else { errStudentID.SetError((Control)sender, ""); } juge001(宰相) 介绍的页面怎么打不开啊? toolTip出现的位置能控制不? 不客气,你可以到微软的MSDN网站上看一下http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/frlrfsystemwindowsformstooltipclasstopic.asp 能让toolTip不自己弹出来,而只有我来toolTip.Show(TextBox1,"hello");它才弹出来吗? 请问,这个读取文件,为什么是乱码呢? 使用C#给系统增加右键菜单 如何用GDI+生成镜面图像? 谁能说说List<T>的使用啊 各位高手请进!!! datagrid控件里显示一个表的信息,点击删除其中一条,怎么刷新这个表的内容。 C#能开发window窗体程序吗? 在dataset中如何实现这样的排序功能 如何用C#往Xml文件插入一个多层的Xml节点? GDI+中的鼠标事件 如何将类似"8G74G6DG"转化成对应汉字 SqlDataReader.GetFloat()总是报错?
比方说我要验证textbox空间的内容,代码如下 if (rdoStudentID.Checked == true && txtStudentID.TextLength != 9 && txtStudentID.TextLength > 0)
{
errStudentID.SetIconAlignment((Control)sender, ErrorIconAlignment.MiddleRight);
errStudentID.SetError((Control)sender, "学号输入有误");
e.Cancel = true;
SystemSounds.Exclamation.Play();
txtStudentID.Text = "";
}
else
{
errStudentID.SetError((Control)sender, "");
}
http://msdn.microsoft.com/library/chs/default.asp?url=/library/CHS/cpref/html/frlrfsystemwindowsformstooltipclasstopic.asp