Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. Public Class Form1
  2. Dim result, amount, con_rate As String
  3.  
  4.  
  5. Private Sub Label1_Click(sender As Object, e As EventArgs) Handles Label1.Click
  6.  
  7. End Sub
  8.  
  9. Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
  10.  
  11. End Sub
  12.  
  13. Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
  14.  
  15. End Sub
  16.  
  17. Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
  18.  
  19. End Sub
  20.  
  21. Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
  22. If ComboBox1.SelectedIndex = 0 Then
  23. con_rate = 0.9
  24. TextBox2.Text = con_rate
  25. End If
  26.  
  27. If ComboBox1.SelectedIndex = 1 Then
  28. con_rate = 1.11
  29. TextBox2.Text = con_rate
  30. End If
  31.  
  32. If ComboBox1.SelectedIndex = 2 Then
  33. con_rate = 0.79
  34. TextBox2.Text = con_rate
  35. End If
  36.  
  37. If ComboBox1.SelectedIndex = 3 Then
  38. con_rate = 1.26
  39. TextBox2.Text = con_rate
  40. End If
  41.  
  42. End Sub
  43.  
  44. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  45.  
  46. amount = Val(TextBox1.Text)
  47. TextBox3.Text = (Val(TextBox1.Text) * Val(TextBox2.Text))
  48. If Not amount = IsNumeric(amount) Then
  49. MsgBox("Put correct input")
  50. End If
  51.  
  52. End Sub
  53.  
  54. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement