Answer the question
In order to leave comments, you need to log in
How to display tooltip when entering prohibited characters?
private void emailBox_KeyPress(object sender, KeyPressEventArgs e)
{
if(!Char.IsLetter(e.KeyChar) && e.KeyChar != 8 && !Char.IsDigit(e.KeyChar) == true)
{
e.Handled = true;
return;
}
else if (e.KeyChar < 33 && e.KeyChar > 47) // При вводе допустим этих символов tooltip не вылазит
{
toolTip1.IsBalloon = true;
toolTip1.Show("Забыли ввести", this.emailBox, 1000);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question