Explora Libros electrónicos
Categorías
Explora Audiolibros
Categorías
Explora Revistas
Categorías
Explora Documentos
Categorías
VISUAL BASIC
VISUAL BASIC
HUANCAVELICA - 2014
1
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
EJERCICIOS DE APLICACIÓN
APLICA01.
SOLUCIÓN:
2
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Guardar tu proyecto.
Ejecuta. Y debe salir así
como la figura siguiente
4
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
APLICA 02.
SOLUCION:
4. Una
vez
ter
min
ada
la
fase
de
dise
ño
uste
d obtendrá el siguiente formulario.
End Sub
End
End Sub
APLICA 03.
SOLUCION:
7
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Label1 Caption Codigo
Label2 Caption Apellidos
Label3 Caption Nombres
Name(Nombre) Area
Label4
Font Arial, tamaño 10
Label5 Caption Nota1
Label6 Caption Nota2
Label7 Caption Nota3
Label8 Caption Promedio
Label9 Caption Condicion
Text1 Name(Nombre) TxtCodigo
Text2 Name(Nombre) TxtApellidos
Text3 Name(Nombre) TxtNombres
Text4 Name(Nombre) TxtArea
Text5 Name(Nombre) TxtNota1
Text6 Name(Nombre) TxtNota2
Text7 Name(Nombre) TxtNota3
Text8 Name(Nombre) TxtPromedio
Text9 Name(Nombre) TxtCondicion
Name(Nombre) CmdAceptar
Command1 Caption &Aceptar
Enabled False
Name(Nombre) CmdNuevo
Command2 Caption &Nuevo
Enabled False
Name(Nombre) CmdSalir
Command3
Caption &Salir
Picture c:\vb\bmp\presentacion
Image 1
Strectch True
8
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
4. Una vez terminada la fase de diseño usted obtendrá el
siguiente formulario.
TxtCondicion.Text = "Aprobado"
9
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Else
TxtCondicion.Text = "Desaprobado"
TxtCondicion.BackColor = RGB(255, 0, 0)
End If
CmdAceptar.Enabled = False
CmdNuevo.Enabled = True
End Sub
TxtCodigo.Text = ""
TxtApellidos.Text = ""
TxtArea.Text = ""
TxtNota1.Text = ""
TxtNota2.Text = ""
TxtNota3.Text = ""
TxtPromedio.Text = ""
TxtCondicion.Text = ""
10
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
TxtCodigo.SetFocus
CmdAceptar.Enabled = False
CmdNuevo.Enabled = False
End Sub
End
End Sub
CmdAceptar.Enabled = True
End Sub
APLICA 04.
Desarrollar una aplicación que permita calcular las boletas de pagos de los
trabajadores del Colegio Nacional “La Victoria de Ayacucho”, se debe
ingresar el código del trabajador, nombres y apellidos. Seleccionar la
Categoría (maestro, oficial y Peón), el pago por hora para la categoría
11
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
maestro es de 4.00 soles, para la categoría oficial es 3.50 soles,
para la categoría peón es de 3.00 soles.
SOLUCION:
12
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
CONTROL PROPIEDAD VALOR
Name(Nombre) FmrPresenta
Caption C.N."LA VICTORIA DE AYACUCHO"
Form1
Icon c:\vb\bmp\presentacion
BackColor Crema(&HOOC0E0FF&)
C.N. "LA VICTORIA DE AYACUCHO"
Caption Sistema de Planillas
Label1 Font Arial, Tamaño 18
Aligment 2 - center
BackColor Crema(&HOOC0E0FF&)
Picture c:\vb\bmp\presentacion
Imagen 1
Strectch True
Name(Nombre) CmdContinuar
Command1 Caption &Continuar
Style 1 - Graphical
4. Una vez Terminada la fase de diseño usted obtendrá el siguiente
formular
io:
13
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Añadir Código:
Comando CmdContinua
14
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
15
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
16
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Comando CmdAceptar:
20
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
CmdCancelar Click
Comando CmdNuevo.
mpago = 4
End Sub
21
PROF. ANGEL MENDEZ YALLI
COLEGIO NACIONAL “LA VICTORIA DE AYACUCHO”
VISUAL BASIC
Control OptMaestro Evento Click
mpago = 4
End Sub
mpago = 3.5
End Sub
mpago = 3
End Sub
22
PROF. ANGEL MENDEZ YALLI