MaskedTextBox Currency Input Mask Limits
Solution 1
The standard way of applying the mask via Regular Expresions is detailed in Microsoft documentation: https://msdn.microsoft.com/en-us/library/ms234064.aspx Pertinent to your case it could be something like: $\d{9}.00
Hope this may help.
Solution 2
This worked for me. Instead of creating a custom mask, create a custom maskedTextbox.
Even with the correct mask, the delivered maskedTextBox is difficult for users to enter data. The currencyTextbox automatically formats/shifts the entered values.
Once you add that class to your project, you'll see the currencyTextBox appear in your toolbox. Then just set a mask for it depending on how large a dollar value you want to store. According to the author, you use all 0s, I personally used "$000,000.00"
Lugarini
Updated on June 04, 2022Comments
-
Lugarini almost 2 years
Im trying to make a
Custom Input Mask
forcurrency
inVisual Studio 2013
But, this type of mask has a limit: 9999,00. I can't write numbers like 99999999,00.
I want amask
that works with any amount of numbers
Is it possible?