Solved

How to Format MaskedTextBox Control

Posted on 2007-11-13
4
633 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
Comment Utility
Hello Denise,

Have you tried "#0,000" ?
0
 

Author Comment

by:DeniseGoodheart
Comment Utility
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
Comment Utility
Why don't you use an regular textbox and set the format on leave event ?
0
 

Author Comment

by:DeniseGoodheart
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now