Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim result, amount, con_rate As String
- Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
- End Sub
- Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
- End Sub
- Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
- End Sub
- Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
- End Sub
- Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
- If ComboBox1.SelectedIndex = 0 Then
- con_rate = 0.9
- TextBox2.Text = con_rate
- End If
- If ComboBox1.SelectedIndex = 1 Then
- con_rate = 1.11
- TextBox2.Text = con_rate
- End If
- If ComboBox1.SelectedIndex = 2 Then
- con_rate = 0.79
- TextBox2.Text = con_rate
- End If
- If ComboBox1.SelectedIndex = 3 Then
- con_rate = 1.26
- TextBox2.Text = con_rate
- End If
- End Sub
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- amount = Val(TextBox1.Text)
- TextBox3.Text = (Val(TextBox1.Text) * Val(TextBox2.Text))
- If Not amount = IsNumeric(amount) Then
- MsgBox("Put correct input")
- End If
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement