Inside form I have txtbox with following event code
private void txtCode_KeyPress(object sender, KeyPressEventArgs e)
{
char ch = e.KeyChar;
if (!Char.IsDigit(ch) && ch != 8)
{
e.Handled = true;
errorProvider1.SetError(txtCode, "numbers only");
}
}
Error icon is shown right to the txtbox with error message, how can I remove this error icon when user input is cleared or deleted or replaced with valid (digit) input?
These way it stays shown always.