CURRENCY CONVERSION USING WINDOW APPLICATION
AIM:
To convert currency values using window application.
PROGRAM:
Public Class Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim v, res, val1, val2 As Double
If ComboBox1.SelectedItem = "Rupee" Then val1 = 1.0
ElseIf
ComboBox1.SelectedItem = "Dollar" Then val1 = 67.5
ElseIf ComboBox1.SelectedItem = "Euro" Then val1 = 73
End If
If ComboBox2.SelectedItem = "Rupee" Then val2 = 1.0
ElseIf
ComboBox2.SelectedItem = "Dollar" Then val2 = 67.5
ElseIf
ComboBox2.SelectedItem = "Euro"
Then val2 = 73
End If
v = TextBox1.Text
res = v * val1 / val2
TextBox2.Text = Str(res)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button3.Click
End
End Sub
End Class
INPUT&OUPUT: