C # - Masked text fields (how to get rid of underlining in them)

How can I get rid of the ugly underline in the texboxe mask in C # forms? As below:

http://i.stack.imgur.com/UjiAF.png

+4
source share
3 answers

You must set the PromptChar property PromptChar value other than '_'.

http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.promptchar.aspx

+5
source

You can play with PromptChar .

+1
source

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.

+1
source

All Articles