Solved

different currency symbols in VB 2010

Posted on 2012-03-31
4
565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

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 …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

624 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