• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

How to Format MaskedTextBox Control

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
DeniseGoodheart
Asked:
DeniseGoodheart
  • 2
  • 2
1 Solution
 
Jorge PaulinoIT Pro/DeveloperCommented:
Hello Denise,

Have you tried "#0,000" ?
0
 
DeniseGoodheartAuthor Commented:
Hi jpaulino:

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

Thanks,
Denise
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Why don't you use an regular textbox and set the format on leave event ?
0
 
DeniseGoodheartAuthor Commented:
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

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now