Public Class Form1
Dim x As Double
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If CB_form.Text = "EU" And CB_to.Text = "USD" Then
x = 1.21
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "EU" And CB_to.Text = "IDR" Then
x = 17352.66
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "USD" And CB_to.Text = "EU" Then
x = 0.82
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "USD" And CB_to.Text = "IDR" Then
x = 14297.25
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "IDR" And CB_to.Text = "EU" Then
x = 0.000058
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "IDR" And CB_to.Text = "USD" Then
x = 0.00007
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "EU" And CB_to.Text = "EU" Then
x = 1
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "USD" And CB_to.Text = "USD" Then
x = 1
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
If CB_form.Text = "IDR" And CB_to.Text = "IDR" Then
x = 1
T_result.Text = Str(CDec(T_Amount.Text) * x)
End If
End Sub
End Class