hi all,
I have a NumericUpDown control. The minimum value is 1 and the maximum value is 99. I want to prevent the user from entering a value bigger then 100. Currently if you enter 100, after validating the control return to the maximum value. I want to prevent the user from entering 100. The use may enter 98, 99, ... Anyone have an idea on how to do that? What event to use ? I've already searched the net and didn't find anything.
Or anyone have any idea to make the user only capable of entering two digits?
Thank you very much
Michael
Loading
Sam HobbsPosted Mar 5, 2010, 1:17 PM
EhabPosted Mar 5, 2010, 6:07 AM
You could do something like: in the NumericUpDown events, double click the KeyUp event. In it, you could write a code to the effect you want. For example:
private void numericUpDown1_KeyUp(object sender, KeyEventArgs e)
{
}
Let me know if it works for you :)