Private Sub C_Click()
pantalla.Caption = ""
End Sub
Private Sub cero_Click()
pantalla.Caption = pantalla.Caption + "0"
End Sub
Private Sub cinco_Click()
pantalla.Caption = pantalla.Caption + "5"
End Sub
Private Sub coma_Click()
pantalla.Caption = pantalla.Caption + ","
End Sub
Private Sub cuatro_Click()
pantalla.Caption = pantalla.Caption + "4"
End Sub
Private Sub dividido_Click()
auxiliar2.Caption = dividido.Caption
auxiliar.Caption = pantalla.Caption
pantalla.Caption = ""
End Sub
Private Sub dos_Click()
pantalla.Caption = pantalla.Caption + "2"
End Sub
Private Sub igual_Click()
If auxiliar2.Caption = "+" Then
pantalla.Caption = Val(auxiliar.Caption) + Val(pantalla.Caption)
auxiliar.Caption = ""
End If
If auxiliar2.Caption = "-" Then
pantalla.Caption = Val(auxiliar.Caption) - Val(pantalla.Caption)
auxiliar.Caption = ""
End If
If auxiliar2.Caption = "x" Then
pantalla.Caption = Val(auxiliar.Caption) * Val(pantalla.Caption)
auxiliar.Caption = ""
End If
If auxiliar2.Caption = "/" Then
pantalla.Caption = Val(auxiliar.Caption) / Val(pantalla.Caption)
auxiliar.Caption = ""
End If
auxiliar2.Caption = ""
End Sub
Private Sub mas_Click()
auxiliar.Caption = pantalla.Caption
pantalla.Caption = ""
auxiliar2.Caption = mas.Caption
End Sub
Private Sub menos_Click()
auxiliar.Caption = pantalla.Caption
pantalla.Caption = ""
auxiliar2.Caption = menos.Caption
End Sub
Private Sub nueve_Click()
pantalla.Caption = pantalla.Caption + "9"
End Sub
Private Sub ocho_Click()
pantalla.Caption = pantalla.Caption + "8"
End Sub
Private Sub por_Click()
auxiliar2.Caption = por.Caption
auxiliar.Caption = pantalla.Caption
pantalla.Caption = ""
End Sub
Private Sub seis_Click()
pantalla.Caption = pantalla.Caption + "6"
End Sub
Private Sub siete_Click()
pantalla.Caption = pantalla.Caption + "7"
End Sub
Private Sub tres_Click()
pantalla.Caption = pantalla.Caption + "3"
End Sub
pantalla.Caption = pantalla.Caption + "1"
End Sub
No comments:
Post a Comment