Private Sub Borrar_Click()
Pantalla.Caption = ""
End Sub
Private Sub cinco_Click()
Pantalla.Caption = Pantalla.Caption + "5"
End Sub
Private Sub cuatro_Click()
Pantalla.Caption = Pantalla.Caption + "4"
End Sub
Private Sub division_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "/"
Pantalla.Caption = ""
End Sub
Private Sub dos_Click()
Pantalla.Caption = Pantalla.Caption + "2"
End Sub
Private Sub igual_Click()
If auxsigno.Caption = "+" Then
Pantalla.Caption = Val(Auxnro.Caption) + Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "-" Then
Pantalla.Caption = Val(Auxnro.Caption) - Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "*" Then
Pantalla.Caption = Val(Auxnro.Caption) * Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "/" Then
Pantalla.Caption = Val(Auxnro.Caption) / Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
End Sub
Private Sub mas_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "+"
Pantalla.Caption = ""
End Sub
Private Sub menos_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "-"
Pantalla.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()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "*"
Pantalla.Caption = ""
End Sub
Private Sub punto_Click()
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
Private Sub uno_Click()
Pantalla.Caption = Pantalla.Caption + "1"
End Sub
Private Sub zero_Click()
Pantalla.Caption = Pantalla.Caption + "0"
End Sub
Pantalla.Caption = ""
End Sub
Private Sub cinco_Click()
Pantalla.Caption = Pantalla.Caption + "5"
End Sub
Private Sub cuatro_Click()
Pantalla.Caption = Pantalla.Caption + "4"
End Sub
Private Sub division_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "/"
Pantalla.Caption = ""
End Sub
Private Sub dos_Click()
Pantalla.Caption = Pantalla.Caption + "2"
End Sub
Private Sub igual_Click()
If auxsigno.Caption = "+" Then
Pantalla.Caption = Val(Auxnro.Caption) + Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "-" Then
Pantalla.Caption = Val(Auxnro.Caption) - Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "*" Then
Pantalla.Caption = Val(Auxnro.Caption) * Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
If auxsigno.Caption = "/" Then
Pantalla.Caption = Val(Auxnro.Caption) / Val(Pantalla.Caption)
Auxnro.Caption = ""
auxsigno.Caption = ""
End If
End Sub
Private Sub mas_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "+"
Pantalla.Caption = ""
End Sub
Private Sub menos_Click()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "-"
Pantalla.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()
Auxnro.Caption = Pantalla.Caption
auxsigno.Caption = "*"
Pantalla.Caption = ""
End Sub
Private Sub punto_Click()
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
Private Sub uno_Click()
Pantalla.Caption = Pantalla.Caption + "1"
End Sub
Private Sub zero_Click()
Pantalla.Caption = Pantalla.Caption + "0"
End Sub
No comments:
Post a Comment