Programacion Visual

Páginas: 7 (1614 palabras) Publicado: 11 de diciembre de 2012
Entorno de Trabajo de Visual Basic 6.0
Entorno de Trabajo de Visual Basic 6.0
Diseñador de Formulario
Diseñador de Formulario
Ventana de Propiedades
Ventana de Propiedades
Barra de Herramientas
Barra de Herramientas
Barra de menús
Barra de menús
Explorador de proyectos
Explorador de proyectos
Cuadro de herramientas
Cuadro de herramientas

Caja de Herramientas de Visual Basic 6.0Diseño de Formulario Edad

Diseño de Formulario Edad (código)

Private Sub Command1_Click()
Text2.Text = 2012 - Val(Text1.Text)
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
Formulario Edad (Código)

Private Sub Command1_Click()
Text3.Text = Val(Text2.Text) -Val(Text1.Text)
End Sub.

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
Operaciones Básicas

Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Text3.Text = Val(Text2.Text) +Val(Text1.Text)
End Sub

Private Sub Command4_Click()
Text3.Text = Val(Text2.Text) * Val(Text1.Text)
End Sub

Private Sub Command5_Click()
Text3.Text = Val(Text2.Text) / Val(Text1.Text)
End Sub

Private Sub Command6_Click()
Text3.Text = Val(Text2.Text) - Val(Text1.Text)
End Sub
Cantidad Producto

Private Sub Command1_Click()
Text4.Text = Val(Text2.Text) * Val(Text3.Text)
Text5.Text =Val(Text4.Text) * 0.16
Text6.Text = Val(Text4.Text) + Val(Text5.Text)
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Triangulo

Private Sub Command1_Click()
Dim lado1 As Integer
Dim lado2 As Integer
Dim lado3 As Integer
lado1 = Text1.Text
lado2 = Text1.Text
lado3 = Text1.Text
Text7.Text =Val(lado1) + Val(lado2) + Val(lado3)
End Sub

Private Sub Command2_Click()
Dim Base As Integer
Dim Altura As Integer
Base = Text5.Text
Altura = Text6.Text
Text6.Text = Val(Base) * Val(Altura) / 2
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
End Sub

Private Sub Command4_Click()End
End Sub
Perímetro del Rectángula

Dim lado4 As Integer
Dim resultado As Integer
lado1 = Text1.Text
lado2 = Text1.Text
lado3 = Text1.Text
lado4 = Text1.Text
resultado = Val(lado1) + Val(lado2) + Val(lado3) + Val(lado4)
Text5.Text = resultado
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""Text4.Text = ""
Text5.Text = ""
End Sub
Calcula tu edad

Private Sub Command1_Click()
Dim añoactual As Integer
Dim añonacimiento As Integer
añoactual = Text1.Text
añonacimiento = Text2.Text
MsgBox ("Tu edad es:") & Val(añoactual) - Val(añonacimiento)

End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub Command3_Click()
End
End SubContraseña

Private Sub Command1_Click()
Dim ususario As String
Dim contraseña As String
usuario = Text1.Text
contraseña = Text2.Text
If usuario = "arianaa" And contraseña = "ari" Then
Form2.Show
Form1.Hide
Else
MsgBox ("Error,Volver a intentar")
End If
End Sub

Private Sub Command2_Click()
End
End Sub
Calificaciones

Private Sub Command1_Click()
If Text3.Text >= 6 Then
MsgBox("Aprobado")
Else
MsgBox ("Reprobado")
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub
Status

Private Sub Command1_Click()
If Text2.Text = 10 Then
MsgBox ("Excelente")
Else
If Text2.Text <= 9 And Text2.Text >= 8 Then
MsgBox ("Bueno")
Else
If Text2.Text >= 6 And Text2.Text...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programación visual
  • programacion visual
  • Programacion visual
  • programacion visual
  • programacion visual
  • Programacion Visual
  • Programacion Visual
  • Programacion estructurada vs programacion visual

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS