Solved

VB.Net: Textbox currency format

Posted on 2012-04-03
2
951 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 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

13 Experts available now in Live!

Get 1:1 Help Now