Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Private Sub op_SelectedIndexChanged(sender As Object, e As EventArgs) Handles

op.SelectedIndexChanged
If op.Text = "Suma" Then
rs.Text = Val(n1.Text) + Val(n2.Text) 'combobox'
End If
If op.Text = "Resta" Then
rs.Text = Val(n1.Text) - Val(n2.Text)
End If
If op.Text = "Multiplicacion" Then
rs.Text = Val(n1.Text) * Val(n2.Text)
End If
If op.Text = "Divicion" Then
rs.Text = Val(n1.Text) / Val(n2.Text)
End If
End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles


Button1.Click
n1.Clear() 'limpiar'
n2.Clear()
rs.Clear()
op.Text = ""
n1.Focus()
End Sub

4 label= tex=numero1 solo 1 y 2 los demas es operacion y resultado

3 texbox name=n1,name=n2, name=rs

1 combobox= name=op

1 button text=limpiar

You might also like