How to show the error without mouse hover on the error provider?

1.4k Views Asked by At

How to show the error without mouse hover on the error provider ?enter image description here

this.errorProvider1.SetError(textBox1, "This field must contain text");
1

There are 1 best solutions below

0
On

Might not be the best chioce but should work

    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);
    }