Solved

VB.Net: Textbox currency format

Posted on 2012-04-03
2
970 Views
Last Modified: 2012-04-04
Hi Experts,

I am using vb.net.

I wanted to set a textbox to a currency format. but i could not find it in the properties.

Could you please give me the code to make the textbox in currency format.

Thanks in advance.
0
Comment
Question by:baabaa_nl
2 Comments
 
LVL 38

Accepted Solution

by:
PaulHews earned 250 total points
ID: 37803445
Assuming data binding, you should be able to set the FormatString property:

TextBox1.DataBindings.Item(0).FormatString = "C"

Open in new window


If not databinding, then you just assign the string to the text property:

TextBox1.Text = CurrencyValue.ToString("C")

Open in new window

0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 37805318
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

830 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