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:








MUESTRA FINAL:CRONÓMETRO


Hacer un Cronómetro en Visual Basic 2010



Resultado de imagen de cronometro en visual basic 6

Hola a todos, hoy haremos un cronometro con el control timer en Visual Basic , primeramente abrimos un nuevo proyecto en visual basicy manos a la obra.
Arrastramos a nuestro formulario desde el cuadro de herramientas 3 BUTONS  en sus propiedades modifican el TEXT y colocan el nombre que se mostrara para cada uno será “Iniciar” ”Pausa” “Reiniciar” pueden personalizar el color de fondo en BACKCOLOR y el tipo de letra en FONT, también se agregan  4 LABELS y en sus propiedades modifican el TEXT para el 1ro “0” y para los demás “00”; ahora agregan el control TIMER,  resultando algo parecido recuerden que es algo totalmente personalizado.










Le dan doble click a cada uno para acceder al código de los botones:
Para el 1ro:
Timer1.Start()
Para el 2do:
 Timer1.Stop()
Para el 3ro:
  Label1.Text = “0”
        Label2.Text = “00”
        Label3.Text = “00”
        Label4.Text = “00”
Ahora doble click en el timer1, y colocar el siguiente código:






Timer1.Interval = 10
Label4.Text += 1
If Label4.Text = “60”  Then
Label3.Text += 1
Label4.Text = 0
End If
If Label3.Text = 60 Then           
Label2.Text += 1          
 Label3.Text = 0       
End If       
If Label2.Text = 60  Then           
Label1.Text += 1           
Label4.Text = 0       
End If





Y YA LISTO UN CRONOMETRO EN VISUAL BASIC 2010. OE YAVE CUIDENSE...