Codigo de cambio de moneda vb.net

Solo disponible en BuenasTareas
  • Páginas : 2 (268 palabras )
  • Descarga(s) : 0
  • Publicado : 7 de noviembre de 2011
Leer documento completo
Vista previa del texto
Public Class Form1
Dim dolar As Double = 13.45
Dim euro As Double = 18.31
Dim peso As Double = 1
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVale As System.EventArgs) Handles ComboBox1.SelectedIndexChanged

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesTextBox1.TextChanged

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(ByVal sender AsSystem.Object, ByVal e As System.EventArgs) Handles Button1.Click
If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 1 Then
TextBox2.Text = Val(TextBox1.Text) / dolar& MsgBox("dolares")
End If
If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 2 Then
TextBox2.Text = Val(TextBox1.Text) * euro & MsgBox("pesos")
EndIf
If ComboBox1.SelectedIndex = 1 And ComboBox2.SelectedIndex = 0 Then
TextBox2.Text = Val(TextBox1.Text) * dolar / euro & MsgBox("euros")
End If
IfComboBox1.SelectedIndex = 1 And ComboBox2.SelectedIndex = 2 Then
TextBox2.Text = Val(TextBox1.Text) * dolar & MsgBox("pesos")
End If
If ComboBox1.SelectedIndex = 2 AndComboBox2.SelectedIndex = 0 Then
TextBox2.Text = Val(TextBox1.Text) / euro & MsgBox("euros")

End If
If ComboBox1.SelectedIndex = 2 And ComboBox2.SelectedIndex = 1 ThenTextBox2.Text = Val(TextBox1.Text) / dolar & MsgBox("dolares")

End If

If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 0 Then
MsgBox("metecantidades diferentes ")
End If
If ComboBox1.SelectedIndex = 1 And ComboBox2.SelectedIndex = 1 Then
MsgBox("mete cantidades diferentes ")
End If
If...
tracking img