Some example code on how to apply a price format on a MaskedTextBox, the mask at startup would be $0.00 and when typing it begins by replacing the first zero from right to left, which is separating thousands, in winforms, VS 2017. As the image:
Asked
Active
Viewed 263 times
0
-
Does this answer your question? [Maskedtextbox money](https://stackoverflow.com/questions/15960410/maskedtextbox-money) – 41686d6564 stands w. Palestine Jul 13 '20 at 19:12
-
Thanks, but what they answered is that it cannot be applied, I try to do it in C # since in Java it is possible – Code_Serv Jul 13 '20 at 19:22
1 Answers
0
You can achieve what you want with the NumericUpDown
control, and a Label
.
For this example, I set the follow properties of NumericUpDown
to:
DecimalPlaces = 2
ThousandsSeparator = True
Maximum = 100000000
TextAlign = Right

D.Kastier
- 2,640
- 3
- 25
- 40