Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Ejercicios de Clase en VB
Ejercicios de Clase en VB
San Rafael 1
Marisa E. Conde .
Especialista en Informática Educativa – UBA-
1-Nombre y apellido
Ejercicio 1 Armar un formulario donde se deba ingresar
el apellido.
La respuesta deberá salir a través de una label donde
diga “Bienvenido”…..Esta es tu primera actividad”
Programación
Private Sub cmdahora_Click()
lblmensaje.Caption = "Bienvenido " & txtnombre.Text & " Esta es tu primera actividad"
End Sub
-----------------------------------------------------
Private Sub cmdfin_Click()
End
End Sub
2-Colores
Option Explicit
Private Sub Form_Load()
txtCaja = 0
End Sub
3-Balanza
Control Propiedad Valor
textbox Name txtpeso
Text
textbox Name txtalt
Text
textbox Name txtpeso
Text
Command Name: cmdresultado
Botton
Caption: resultado
4-Edad
Control Propiedad Valor
1 textbox Name txtfecha
Text
1 textbox Name txtalt
Text
1 textbox Name txtpeso
Text
1 Command Name: cmdedad
Botton
Caption: resultado
1 Label Name: lblresultado
Caption:
1 Label Name: Lbl1
Caption Ingrese su nombre
1 Label Name: Lbl2
Caption: Ingrese su fecha de
nacimiento 00/00/00
5-Ruleta
------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
6-Calculadora
Option Explicit
Private Sub cmdDiv_Click()
txtResult.Text = Val(txtOper1.Text) /
Val(txtOper2.Text)
lblOp.Caption = "/" Colocar los siguientes controles
3 text – 2 label – 4 command
End Sub
button
Material de la Asignatura Programación 4to AI – Inst. San Rafael 4
Marisa E. Conde .
Especialista en Informática Educativa – UBA-
-----------------------------------------------------------------------------------------------------------------------
7-Ordenar Numeros
Option Explicit
Dim n1, n2, n3 As Integer
Private Sub Command1_Click()
Label5.Caption = ""
Label6.Caption = ""
Label4.Caption = ""
Label1.Visible = True
Label2.Visible = True
Label3.Visible = True Colocar los siguientes controles
7 label 2command button. Las 3 sup
Call azar mod
End Sub
-----------------------------------------------------------------------------------------------------------------------
8-Modificaciones en la fuente
Dim valor As Integer
Dim tipo As String
Private Sub Command1_Click()
Label1.FontBold = True
End Sub
-----------------------------------------------------------------------------------------------------------------------
9-CARITA FELIZ
-----------------------------------------------------------------------------------------------------------------------
10-CARRITO DE COMPRA
Text1.Text = total
End Sub
--------------------------------------------------------------------------------
11-COHETE
----------------------------------------------------
13-Virus
Private Sub Command1_Click()
For A = 0 To 10
If A = 1 Then
MsgBox ("Se esta formateando el rígido")
ElseIf A = 2 Then
Material de la Asignatura Programación 4to AI – Inst. San Rafael 8
Marisa E. Conde .
Especialista en Informática Educativa – UBA-