It looks like your MaskedEdit is more trouble than it's worth to deal with your particular range of issues. A better control to use might be the NumericUpDown.
The upside to NumericUpDown:
- There are no underscore prompts to try and get rid of
- It will only accept numeric input
- So there is no need to try and convert the value. You will always have an integer
- Setting Minimum and Maximum value properties gives you automatic data entry validation
- Provides multiple modes of data entry:
- Typing
- Clicking up/down buttons with a mouse
- Up/down with keyboard
- If you like, you could hide the up/down buttons altogether: C# WinForms numericUpDown control (removing the spin box)