If you just need a simple control with numbers, you can always use NumericUpDown instead of TextBox or MaskedTextBox (you can also hide its arrows just set _numericUpDownControl.Controls[0].Hide(); ). For more complex situations MaskedTextBox or custom TextBox are suitable.
source share