Display rupee symbol in visual basic 6
Are you enable to display the Indian rupee (₹) symbol in visual basic 6 then here is the best and easy solution for you. Here I have explained how to display the rupee (₹) symbol in visual basic 6. When we create any financial program in visual basic 6.0 and then if you want to Indian rupee symbol (₹) instead of dollar symbol then it is impossible in the visual basic old version. But don’t worry I have a possible solution for you.
Steps for displaying the Indian currency symbol in visual basic 6
- First, create a new form
- Draw three textboxes for inputs to display the result, six checkboxes, and seven labels for display information. (This is only for example purpose we want focused on next steps)
- Now draw a picture box and upload the currency symbol in that picture box, then set the ‘Appearance’ property as a ‘Flat’ and ‘Borderstyle’ is ‘none’ then you can set Backcolor property as per your requirement.
- Then draw two buttons, one button for calculating bills and the other is for reset values.
- Then write code on the ‘Calculate Bill’ button.
- After that run the program.
Source code for display rupee symbol
Dim tot As Integer
Private Sub Command1_Click()
tot = 0
If chk1.Value = 1 Then
tot = tot + Label1.Caption
End If
If chk2.Value = 1 Then
tot = tot + Label2.Caption
End If
If chk3.Value = 1 Then
tot = tot + Label3.Caption
End If
If chk4.Value = 1 Then
tot = tot + Label4.Caption
End If
If chk5.Value = 1 Then
tot = tot + Label5.Caption
End If
If chk6.Value = 1 Then
tot = tot + Val(txtoth.Text)
End If
txttot.Text = tot
End Sub
Private Sub reset_Click()
txttot.Text = ""
txtoth.Text = ""
ptntxt.Text = ""
chk1.Value = "0"
chk2.Value = "0"
chk3.Value = "0"
chk4.Value = "0"
chk5.Value = "0"
chk6.Value = "0"
End SubWhy do we need to display the currency symbol in visual basic 6.0
When we develop or design the corporate project or any type of financial project then there is a very important part is to display the Indian rupee symbol (₹) instead of ‘Rs’. In the above, we have seen the steps for adding currency symbols in your designed form or project. Due to the currency symbol, our application looks attractive and professional. So that it’s very easy to understand to amount in the visual basic application.
Most of the beginners and visual basic advanced programmers are also unable to generate the rupee symbol (₹) in vb6. I also searched the solution for this problem but I can’t find the proper solution for my problem and then I create this solution to display the rupee symbol in visual basic 6. But here the problem of this solution is that the symbol is image format so that it will display as soon as the program execution.
Why we can’t display the Indian rupee symbol in visual basic 6.0
The main reason for this problem is that visual basic 6.0 is not supported to Unicode so that we can’t display the Indian currency symbol. When visual basic 6.0 was developed at the time our Indian currency symbol was not declared because that most of the computers also did not have rupee (₹) symbol, but now the latest computers and latest visual basic have this symbol.
Most of the time students are copy the (₹) symbol and paste it in the textbox or label property but after pasting this symbol there will display the question mark symbol like this ‘?’ and the reason is we have already seen. I think this is the only and best way to display the Indian currency rupee symbol in visual basic 6.0.
I hope you understood how to display the rupee (₹) symbol in visual basic 6. If you want more visual basic examples then you can see another post on how to use option button in visual basic 6.0. If you have any query regarding this program then comment to me.
0 Comments