jueves, 25 de septiembre de 2008

Calculadora (por cami)


Private Sub cero_Click()
auxiliar.Caption = auxiliar.Caption + "0"
End Sub

Private Sub cinco_Click()
auxiliar.Caption = auxiliar.Caption + "5"
End Sub

Private Sub cuatro_Click()
auxiliar.Caption = auxiliar.Caption + "4"
End Sub

Private Sub dos_Click()
auxiliar.Caption = auxiliar.Caption + "2"
End Sub

Private Sub igual_Click()
auxilar.Caption = Val(aux2.Caption) + Val(auxiliar.Caption)
aux2.Caption = ""
auxilar.Caption = Val(aux2.Caption) - Val(auxiliar.Caption)
aux2.Caption = ""
auxilar.Caption = Val(aux2.Caption) / Val(auxiliar.Caption)
aux2.Caption = ""
auxilar.Caption = Val(aux2.Caption) * Val(auxiliar.Caption)
aux2.Caption = ""

End Sub

Private Sub mas_Click()
aux2.Caption = auxiliar.Caption
auxiliar.Caption = ""
End Sub

Private Sub menos_Click()
aux2.Caption = auxiliar.Caption
auxiliar.Caption = ""
End Sub

Private Sub nueve_Click()
auxiliar.Caption = auxiliar.Caption + "9"
End Sub

Private Sub ocho_Click()
auxiliar.Caption = auxiliar.Caption + "8"
End Sub

Private Sub seis_Click()
auxiliar.Caption = auxiliar.Caption + "6"
End Sub

Private Sub siete_Click()
auxiliar.Caption = auxiliar.Caption + "7"
End Sub

Private Sub tres_Click()
auxiliar.Caption = auxiliar.Caption + "3"
End Sub

Private Sub uno_Click()
auxiliar.Caption = auxiliar.Caption + "1"
End Sub

No hay comentarios: