Solved

different currency symbols in VB 2010

Posted on 2012-03-31
4
473 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 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net 2 43
Help with solving error related to resources file 4 48
Need a starter for ETL protocol? 4 57
Show/Hide ASP.NET controls with JQuery best practices 3 49
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

777 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