jueves, 29 de marzo de 2012

CALCULADORA BASICA







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

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

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

Private Sub suma_Click()
lbloperacion.Caption = "+"

End Sub


Private Sub cmdresultado_Click()
If lbloperacion.Caption = "+" Then
lblresultado.Caption = Val(txtval1.Text) + Val(txtval2.Text)
Else
If lbloperacion.Caption = "-" Then
lblresultado.Caption = Val(txtval1.Text) - Val(txtval2.Text)
Else
If lbloperacion.Caption = "*" Then
lblresultado.Caption = Val(txtval1.Text) * Val(txtval2.Text)
Else
If lbloperacion.Caption = "/" Then
lblresultado.Caption = Val(txtval1.Text) / Val(txtval2.Text)

  End If
    End If
    End If
    End If
 End Sub

martes, 20 de marzo de 2012

PROYECTO 1-VISUAL BASIC


Private Sub cmdcambiar_Click()
Lbltexto.Caption = "sisney es feliz"
Lbltexto.Appearance = 1
Lbltexto.BackColor = &HFFFF00

End Sub