viernes, 30 de marzo de 2012

Calculadora Basica

Private Sub CMDDIVIDIR_Click()
lbloperacion.Caption = "/"
End Sub

Private Sub CMDMULTIPLICAR_Click()
lbloperacion.Caption = "*"
End Sub

Private Sub CMDRESTAR_Click()
lbloperacion.Caption = "-"
End Sub

Private Sub CMDRESULTADO_Click()
If lbloperacion.Caption = "+" Then
Lblresultado.Caption = Val(Text1.Text) + (Text2.Text)
Else
If lbloperacion.Caption = "-" Then
Lblresultado.Caption = Val(Text1.Text) - (Text2.Text)
Else
If lbloperacion.Caption = "*" Then
Lblresultado.Caption = Val(Text1.Text) * (Text2.Text)
Else
If lbloperacion.Caption = "/" Then
Lblresultado.Caption = Val(Text1.Text) / (Text2.Text)
End If
End If
End If
End If
End Sub

Private Sub CMDSUMAR_Click()
lbloperacion.Caption = "+"
End Sub

Modificacion de propiedades

Private Sub cmd1_Click()
Lbl1.Caption = "diana mendez"
End Sub