MaskedTextBox - How to input a decimal number with two decimal places

R

Russ Sherlock

I do not wish to re-invent the wheel by deriving a Decimal Number class from
a TextBox

How do I use a MaskedTextBox to input a number +/- with 2 decimal place
precision?

Eg +NNNNNNNNN.NN
or -NNNNNNNNN.NN

I haven't worked out how to make mask characters optional so that the
following are legal:

Legal
1
1.1
+1
-1

Illegal
1.
..123
1.123

Any help would be appreciated

Russ Sherlock
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top