martes, 11 de octubre de 2016

COMO HACER CALCULADORA EN VISUAL BASIC 6






cal 7

CÓDIGOS:
cal 9





cal 10

cal 12


CÓDIGO QUE VA AL INICO 
Dim OPERACION As String
Dim A As Double
Dim B As Double

CÓDIGO DEL #1
Text1.Text = Text1.Text & "1"

CÓDIGO DEL #2
Text1.Text = Text1.Text & "2"

CÓDIGO DEL #3
Text1.Text = Text1.Text & "3"

CÓDIGO DEL #4
Text1.Text = Text1.Text & "4"

CÓDIGO DEL #5
Text1.Text = Text1.Text & "5"

CÓDIGO DEL #6
Text1.Text = Text1.Text & "6"

CÓDIGO DEL #7
Text1.Text = Text1.Text & "7"

CÓDIGO DEL #8
Text1.Text = Text1.Text & "8"

CÓDIGO DEL #9
Text1.Text = Text1.Text & "9"

CÓDIGO DEL #0
Text1.Text = Text1.Text & "0"

CÓDIGO DEL "."
Text1.Text = Text1.Text & "."

CÓDIGO DEL "="
B = Text1.Text
Text1.Text = ""
If OPERACION = "+" Then
Text1.Text = A + B
ElseIf OPERACION = "-" Then
Text1.Text = A - B
ElseIf OPERACION = "*" Then
Text1.Text = A * B
ElseIf OPERACION = "/" Then
Text1.Text = A / B
End If

CÓDIGO DEL "+" SUMA
A = Text1.Text
Text1.Text = ""
OPERACION = "+"

CÓDIGO DEL "-" RESTA
A = Text1.Text
Text1.Text = ""
OPERACION = "-"

CÓDIGO DEL "*" MULTIPLICACIÓN
A = Text1.Text
Text1.Text = ""
OPERACION = "*"

CÓDIGO DEL "/" DIVISIÓN
A = Text1.Text
Text1.Text = ""
OPERACION = "/"

CÓDIGO DEL "LIMPIAR"
Text1.Text = ""


calculadora en visual basic 6.0


AQUÍ EL VIDEO DE COMO HACERLO:








No hay comentarios.:

Publicar un comentario