Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在没有鼠标悬停在错误提供程序上的情况下显示错误?
this.errorProvider1.SetError(textBox1, "This field must contain text");
可能不是最好的选择,但应该可以
if (textBox1.Text == "") { ErrorProvider myerror = new ErrorProvider(); ToolTip mytip = new ToolTip(); myerror.SetError(textBox1, "This field must contain text"); mytip.Show("This field must contain text", textBox1); }