Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

different currency symbols in VB 2010

Posted on 2012-03-31
4
Medium Priority
?
689 Views
Last Modified: 2012-08-13
Hello,

I am writing a VB program to convert USD to various foreign currencies:
India Rupee, Canada Dollar, Eurozone Euro, Japan Yen, Mexico Peso, SouthAfrica Rand, and United Kingdom Pound.

The user will type in an amount in USD and select one of the above countries from a radio button.  The output should display the conversion with the appropriate currency symbol.  I can get everything to work except the currency symbol.  

Any suggestions?
Thanks!
0
Comment
Question by:crockettebhc
  • 2
4 Comments
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 37792527
Most symbols shouldn't be too hard but India Rupee is a relatively new unicode symbol and not every computer will have it. Mine doesn't but it should work if your computer has the latest fonts, with this code:

        Dim strsymbol As String
        If Me.RadioButton1.Checked Then strsymbol = ChrW(Convert.ToInt16("20B9", 16))

Open in new window


The code for euro is "20AC", the rest can be done directly in a string "$", "R", "£", "¥"
0
 
LVL 8

Expert Comment

by:Wiesje
ID: 37792902
Off topic question: Do not forget you will also need up to date currency converter rates. I always get mine from: http://www.xe.com/ucc/
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 2000 total points
ID: 37806223
Update: apparently the India Rupee not displaying correctly had nothing to do with my computer at home, it's just not officialized yet it seems. There's a workaround with a font (Rupee.ttf or Rupee_foradian.ttf) you can download but that's far from ideal of course...

By the way, in some circles it's perfectly acceptable to use the official abbreviations/ISO codes like INR for Indian Rupee, but I'm guessing that's not what you were shooting for?


UPDATE 2: No scratch that, it IS available, but only in certain fonts like Arial.

If not on your system, this article explains how to get it and use it: http://www.labnol.org/india/windows-fonts-for-rupee/18964/
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

927 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