Solved

How to Format MaskedTextBox Control

Posted on 2007-11-13
4
637 Views
Last Modified: 2013-11-26
Good Day:

I am using VS.NET 2005 Windows.Forms.MaskedTextBox Control.  I would like to format my MaskedTextBox control to display data as 99,000 or 9,000.  Unfortunately when I have a value of 9992 it gets displayed as 99,9200 using the format ##,###  It works when I use the format #,### but i need to have the format flexible for values of 99,000 or 9,000.

Any Suggestions?
Thanks,
Denise
0
Comment
Question by:DeniseGoodheart
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:jpaulino
ID: 20275636
Hello Denise,

Have you tried "#0,000" ?
0
 

Author Comment

by:DeniseGoodheart
ID: 20275936
Hi jpaulino:

Yes I've tried all sorts of combinations; including the one you suggested with no success.

Thanks,
Denise
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 20276033
Why don't you use an regular textbox and set the format on leave event ?
0
 

Author Comment

by:DeniseGoodheart
ID: 20290696
Hi Jpaulino:

I finally gave up trying to use the mask control, and added labels and used the format function.

Thank You,
Denise
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question