Personally, I wouldn't - I'd use a NumericUpDown instead.
But, if you must, you can either do it in the
Validating event[
^] which will occur when teh user leaves the textbox, or in the
TextChanged event[
^] which occurs each time it alters.
Either way, use
int.TryParse[
^] to convert the text to a number, check the range and report or alter it.