Solved

How to Format MaskedTextBox Control

Posted on 2007-11-13
4
635 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

832 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