NumericUpDown allows user to type a number greater than maximum

Viewed 5720

I have a NumericUpDown variable in my class. The minimum and maximum values are set as follows:

myNumericUpDown.Maximum = 9999;
myNumericUpDown.Minimum = 0;

This prevents the spin box from exceeding 9999 or going below 0.

The problem I am having is when the user types inside the text box they can type any arbitrary number greater than Maximum or less than Minimum.

Is there a property in the NumericUpDown class that controls the minimum and maximum values for the text box? Or do I have to write a callback procedure that checks for this condition?

1 Answers
Related