Upload
diego-maxdj-chicaiza
View
1.068
Download
2
Embed Size (px)
DESCRIPTION
EJERCICIOS DE VISUAL BASIC Y ACCES
Citation preview
UNIVERSIDAD TÉCNICA
DE AMBATO
FACULTAD DE CIENCIAS HUMANAS
Y LA EDUCACIÓN
CARRERA DE DOCENCIA EN
INFORMÁTICA
LÓGICA DE PROGRAMACIÓN I
DOCENTE: ING. WILMA GAVILANEZ
ELEMENTO 3: PROGRAMAS EN
VISUAL BASIC 2008 CON ACCESS
2010
NOMBRE: DIEGO CHICAIZA PAREDES
PROGRAMACION I U.T.A 5to “U”
2 FCHE DIEGO CHICAIZA
Elemento 3.
Ejercicios de programación en Microsoft Visual Studio 2008 enlazada con Microsoft
Access 2010
EJERCICIO 1
Realice un programa que me permita visualizar una caratula con los datos personales y
logos de la Universidad Técnica de Ambato y la Facultad de Ciencias Humanas y la
Educación.
Label1= Universidad Tecnica de Ambato
Label2= Facultad de Ciencias Humanas y la Educacion
Labels3=Carrera de Docencia en Informatica
Label4= nombre
Label5= nombre de la Ingeniera
Label6= nombre de la materia
Label7= nombre del semestre
Label8= período academico
Picturebox1= insertar imagenes
Logo de la universidad
Logo de la carrera
Como primer paso es crear un formulario para la creacion de la caratula.
PROGRAMACION I U.T.A 5to “U”
3 FCHE DIEGO CHICAIZA
Insertamos los label correspondientes para la realizacion del programa
Una vez modificado los label damos formato a cada uno de ellos.
PROGRAMACION I U.T.A 5to “U”
4 FCHE DIEGO CHICAIZA
Ahora colocamos los picturebox.
Insertamos la imagen en cada uno de los picturebox seleccionados
PROGRAMACION I U.T.A 5to “U”
5 FCHE DIEGO CHICAIZA
Importamos el sello de la Carrera.
Importamos el sello de la Universidad Tecnica de Ambato.
PROGRAMACION I U.T.A 5to “U”
6 FCHE DIEGO CHICAIZA
La caratula está culminada.
Este es la caratula cuando la ejecutemos.
PROGRAMACION I U.T.A 5to “U”
7 FCHE DIEGO CHICAIZA
CONCLUSION.
Este programa da a conocer que el label es una herramienta que puede ser utilizada y
modificada a nuestra manera.
EJERCICIO 2
Realice un programa que me permita ingresar los datos personales del usuario.
DESCRIPCION.
Este es un programa que me permitirá ingresar los datos personales de una persona n
veces y visualizarlos con un msgbox.
Utilizaremos cinco label para nombrar cada uno de los objetos
label1=Titulo
label2=nombre
label3=apellido
label4=direccion
label5=telefono
Utilizaremos dos botones.
buton 1= nuevo
buton 2= salir
CODIFICACION DEL BOTON NUEVO
Private Sub cmdnuevo_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdnuevo.Click
txtnombre.Text = ""
txtapellido.Text = ""
txtdireccion.Text = ""
txttelefono.Text = ""
End Sub
End Class
CODIFICACIÓN DEL BOTON SALIR
Private Sub cmdsalir_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdsalir.Click
End
PROGRAMACION I U.T.A 5to “U”
8 FCHE DIEGO CHICAIZA
End Sub
EJECUCION DEL PROGRAMA
Ingresamos dos datos necesarios
PROGRAMACION I U.T.A 5to “U”
9 FCHE DIEGO CHICAIZA
Una vez culminada el ingreso de datos seleccionamos el boton nuevo y se limpiaran los
textbox ingresados.
CONCLUSION
En el programa podemos observar que es posible blanquear los textbox mediante una
corta codificacion en el boton nuevo.
EJERCICIO 3
APLICACIÓN.
Diseñe un proyecto que visualice un las regiones de nuestro Ecuador
DESCRIPCION.
Diseñaremos nuestro formulario en el cual utilizaremos Objeto como Label, TextBox,
Button, ComboBox, el cual nos permitirá diseñar nuestra aplicación.
Utilizaremos 6 form para ubicar cada uno de las regiones del Ecuador.
Form1= caratula principal.
Form2= selección de la regiones del Ecuador.
Form3= región sierra.
Form4= región costa.
Form5= región amazónica.
Form6= región insular.
Utilizaremos 9 label.
Label1= Ecuador Biodiverso.
Form2= región Sierra.
Form3= concepto de la región sierra.
PROGRAMACION I U.T.A 5to “U”
10 FCHE DIEGO CHICAIZA
Form4= región costa.
Form5= concepto de la región costa.
Form6= región amazónica.
Form7= concepto de la región amazónica.
Form8= región insular.
Form9= concepto de la región insular.
Utilizaremos seis botones.
Boton1= ingrese la contraseña.
Botton2= salir.
Botton3= costa.
Botton4= sierra.
Botton5= oriente.
Botton6= región insular.
Botton7= salir.
Botton8= regresar al menu.
Botton9= regresar al menu.
Botton10= regresar al menu.
Botton11= regresar al menu.
Utilizaremos un textbox para el ingreso de la contraseña.
Textbox1= contraseña
CODIFICACION DE LA CONTRASEÑA EN EL BOTTON1.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles contraseña.Click
If (TextBox1.Text = 1234) Then
Me.Hide()
Form2.Show()
Else
MsgBox("INGRESE NUEVAMENTE LA CONTRASEÑA")
TextBox1.Focus()
TextBox1.SelectionStart = 0
TextBox1.Text = ""
End If
End Sub
CODIFICACION DE SALIR EN EN BOTTON2
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End
End Sub
End Class
PROGRAMACION I U.T.A 5to “U”
11 FCHE DIEGO CHICAIZA
CODIFICACION DE CADA UNO DE LOS FORM PARA QUE SE OCULTEN Y
APAREZCA EL FORM SELECCIONADO.
Public Class Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
Me.Hide()
Form4.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
Me.Hide()
Form5.Show()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button5.Click
Me.Hide()
Form6.Show()
End Sub
End Class
EJECUCIÓN DEL PROGRAMA.
Ingresamos la contraseña antes predeterminada.
PROGRAMACION I U.T.A 5to “U”
12 FCHE DIEGO CHICAIZA
Ahora se aparcera el segundo form en donde seleccionaremos la región que deseamos.
Región costa.
PROGRAMACION I U.T.A 5to “U”
13 FCHE DIEGO CHICAIZA
Cuande queremos regresar al menu simplemente damos clic en regresar al menu.
Región sierra.
Region amazónica.
PROGRAMACION I U.T.A 5to “U”
14 FCHE DIEGO CHICAIZA
Región insular.
CONCLUSIÓN.
En este programa aprenderemos a codificar una contraseña mediante un boton y un
textbox y también a ocultar y desaparecer un form mediante un boton.
EJERCICIO 4
INGRESO DE 3 NOTAS
En el siguiente ejercicio vamos a ingresar el nombre del alumno, nombre del módulo, las nota
de deberes, lecciones y exámenes, el promedio de las tres notas y la equivalencia.
El ingreso de notas va a ser validadas hasta un límite de 10.
La equivalencia: promedio >=7 APROBADO
promedio >5 y <7 SUSPENSO
promedio <5 REPROBADO
Utilizaremos los siguientes label (form1).
Label1= Bienvenidos
Label2= Usuario
Label3= Contraseña
Utilizaremos los siguientes textbox (form1)
PROGRAMACION I U.T.A 5to “U”
15 FCHE DIEGO CHICAIZA
Textbox1=textbox1
Textbox2=textbox2
Utlizaremos un boton para la validacion de la contraseña ingresada.
Button1=ingresar notas
Utilizaremos los siguientes label (form2).
Label1= control de notas.
Label2= Nombre.
Label3= Módulo.
Label4= Deberes.
Label5= Lecciones.
Label6= Exámenes.
Label7= Promedio.
Label8= Equivalencia.
Utilizaremos los siguienest textbox.
Textbox1= textbox1
Textbox2= textbox2
Textbox3= textbox3
Textbox4= textbox4
Textbox5= textbox5
Textbox6= textbox6
Textbox7= textbox7
Utilizaremos dos botones.
Button1= nuevo
Button2=salir
CODIFICADO DEL PROGRAMA
(form1)
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If (txtcontraseña.Text = 1234) Then
Me.Hide()
Form2.Show()
Else
MsgBox("USTED NO PUEDE INGRESAR AL CONTROL DE NOTAS")
txtcontraseña.Focus()
txtcontraseña.SelectionStart = 0
txtcontraseña.Text = ""
End If
End Sub
End Class
PROGRAMACION I U.T.A 5to “U”
16 FCHE DIEGO CHICAIZA
(form2)
Public Class Form2
Private Sub TextBox3_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox3.TextChanged
TextBox6.Text = (((Val(TextBox3.Text)) + (Val(TextBox4.Text))
+ (Val(TextBox5.Text))) / 3)
If (Val(TextBox3.Text)) > 1 And (Val(TextBox3.Text)) <= 10
Then
Else
MsgBox("INGRESE UN VALOR ENTRE 1 Y 10")
TextBox3.Text = ""
TextBox3.Focus()
End If
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox4.TextChanged
If (Val(TextBox4.Text)) > 1 And (Val(TextBox4.Text)) <= 10
Then
Else
MsgBox("INGRESE LOS UN VALOR ENTRE 1 Y 10")
TextBox4.Text = ""
TextBox4.Focus()
End If
TextBox6.Text = (((Val(TextBox3.Text)) + (Val(TextBox4.Text))
+ (Val(TextBox5.Text))) / 3)
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles TextBox5.TextChanged
If (Val(TextBox5.Text)) > 1 And (Val(TextBox5.Text)) <= 10
Then
Else
MsgBox("INGRESE UN VALOR ENTRE 1 Y 10")
TextBox5.Text = ""
TextBox5.Focus()
End If
TextBox6.Text = (((Val(TextBox3.Text)) + (Val(TextBox4.Text))
+ (Val(TextBox5.Text))) / 3)
If (TextBox6.Text >= 7) Then
TextBox7.Text = ("APROBADO")
ElseIf (TextBox6.Text < 7) And (TextBox6.Text > 5) Then
TextBox7.Text = ("SUSPENSO")
ElseIf (TextBox6.Text < 4) Then
TextBox7.Text = ("REPRUEBA")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
PROGRAMACION I U.T.A 5to “U”
17 FCHE DIEGO CHICAIZA
End
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Ingresamos las notas correspondientes para ver la equivalencia del promedio de notas.
PROGRAMACION I U.T.A 5to “U”
18 FCHE DIEGO CHICAIZA
CONCLUSION.
En este programa podemos ver que la ejecucion va interconectada con sentencias
anidadas, esto quiere decir que si no es la primera opción es la segunda.
EJERCICIO 5
TEMA: TABLA DE MULTIPLICAR
1. Abrir un nuevo Proyecto en Visual Basic
Los elementos que vamos a utilizar son 3 form
Form1
Utilizaremos los siguientes label.
Label1= Tablas de multiplicar.
Utlilizaremos un segundo form.
Form2
Utilizaremos los siguientes label.
Label3= Tablas.
Label1= Ingrese el factor.
Label2= Ingrese el limite.
Utilizaremos los siguientes textbox.
Textbox1
Textbox2
Utilizaremos tres botones.
Button1= Regresar
Burron2= Generar.
Button3= Nuevo.
Utilizaresmo un listbox.
Listbox1
Utilizaresmo un form.
Form3
PROGRAMACION I U.T.A 5to “U”
19 FCHE DIEGO CHICAIZA
Utilizaremos un label
Label1= Ingrese el limute.
Utilizaremos los siguientes botones.
Button1= Fibonacci
Button2= Faactorial
Button3= Primos
Button4= Limpiar
Button5= Salir
Utilizaremos un textbox.
Textbox1
CODIFICACION DEL PROGRAMA.
(form1)
Public Class Form1
Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PictureBox2.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Hide()
Form2.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub
End Class
(form2)
Public Class Form2
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Label3.Click
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Me.Hide()
PROGRAMACION I U.T.A 5to “U”
20 FCHE DIEGO CHICAIZA
Form1.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Dim ml As Integer
For INICIO = 1 To Val(TextBox2.Text) Step 1
ml = Val(TextBox1.Text) * INICIO
ListBox1.Items.Add(INICIO & "*" & Val(TextBox1.Text) & "="
& ml)
Next
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
ListBox1.Items.Clear()
TextBox1.Clear()
TextBox2.Clear()
End Sub
End Class
(form3)
Public Class Form3
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim fib As Integer
Dim a As Integer = 1
Dim b As Integer = 0
Dim c As Integer = 0
Dim contador As Integer = 0
For INICIO = 1 To Val(txtlimite.Text) Step 1
b = a
a = c
c = a + b
ListBox1.Items.Add(c)
Next
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
ListBox1.Items.Clear()
ListBox2.Items.Clear()
ListBox3.Items.Clear()
txtlimite.Clear()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Dim x, fac As Integer
x = txtlimite.Text
fac = 1
PROGRAMACION I U.T.A 5to “U”
21 FCHE DIEGO CHICAIZA
For INICIO = x To 1 Step -1
fac = fac * INICIO
Next
ListBox2.Items.Add(fac)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
Dim compro As Boolean = True
Dim numero As Integer
For numero = 1 To Val(txtlimite.Text) * 2
compro = True
For INICIO = 2 To numero - 1
If numero Mod INICIO = 0 Then
compro = False
End If
Next
If compro = True Then
ListBox3.Items.Add(numero)
End If
Next
End Sub
End Class
IMAGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
22 FCHE DIEGO CHICAIZA
Generamos la tabla de multiplicar.
Ingresamos a datos de serie e ingresamos el limite en que deseamos.
PROGRAMACION I U.T.A 5to “U”
23 FCHE DIEGO CHICAIZA
Generamos Fibonacci.
Generamos el Factorial.
PROGRAMACION I U.T.A 5to “U”
24 FCHE DIEGO CHICAIZA
Generamos los numero primos.
CONCLUSION.
El programa anterior ingresamos un listbox en donde podemos visualizar los resultados
requeridos y ya no utilizaremos en msgbox.
EJERCICIO 6
GENERAR UNA PROFORMA (VINOS Y LICORES)
Diseñe un programa que me permita realizar una proforma en donde se visualice una
imagen del producto el precio unitario y precio total.
Utilizaremos un solo form.
Form1
Utilizaremos los siguientes label.
Label1= Vinos y licores
Label2= Licores.
Label3= Cantidad.
Label4= Precio Unitario.
Label5= Precio total.
PROGRAMACION I U.T.A 5to “U”
25 FCHE DIEGO CHICAIZA
Label6= Forma de pago
Label7= Iva 12%
Label8= total.
Utilizaremos un picturebox.
Picturebox.
Utilizaremos un combobox.
Combobox1.
Utilizaremos los siguientes textbox.
Txtcantidad.
Txtunitario.
Txtsubtotal
Txtiva.
Txttotal.
Utilizarmos los siguientes checkbox.
Checkbox1=recargo
Checkbox2=contado
Utilizaremos un boton para el limpiado de los textbox.
Button1=limpiar.
CODIFICACION DEL PROGRAMA.
OJO: las imágenes no se visualizaran ya que la direccion se encuentra es de otro
ordenador.
Public Class Form1
Dim datos1 As Double
Dim datos As Integer
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
datos = ComboBox1.SelectedIndex
If datos = 0 Then
txtunitario.Text = (Val("180.50"))
datos1 = txtunitario.Text
PictureBox1.Load("C:\Users\Lab6\Desktop\IMAGENES\VODKA.jpg")
ElseIf datos = 1 Then
txtunitario.Text = (Val("99.99"))
datos1 = txtunitario.Text
PROGRAMACION I U.T.A 5to “U”
26 FCHE DIEGO CHICAIZA
PictureBox1.Load("C:\Users\Lab6\Desktop\IMAGENES\JOHNNYAZUL.jpg")
ElseIf datos = 2 Then
txtunitario.Text = (Val("130.00"))
datos1 = txtunitario.Text
PictureBox1.Load("C:\Users\Lab6\Desktop\IMAGENES\CHIVASREGAL.jpg")
ElseIf datos = 3 Then
txtunitario.Text = (Val("120.50"))
datos1 = txtunitario.Text
PictureBox1.Load("C:\Users\Lab6\Desktop\IMAGENES\JOHNNYVERDE.jpg")
ElseIf datos = 4 Then
txtunitario.Text = (Val("200.00"))
datos1 = txtunitario.Text
PictureBox1.Load("C:\Users\Lab6\Desktop\IMAGENES\SOMETHIMES.jpg")
End If
End Sub
Private Sub txttotal_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtsubtotal.TextChanged
End Sub
Private Sub txtcantidad_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtcantidad.TextChanged
txtsubtotal.Text = Format(Val(txtcantidad.Text) * datos1,
"###.00")
txtiva.Text = Format((Val(txtsubtotal.Text) * 0.12), "###.00")
txttotal.Text = Format((Val(txtsubtotal.Text)) +
(Val(txtiva.Text)))
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
txtcantidad.Clear()
txtiva.Clear()
txttotal.Clear()
txtsubtotal.Clear()
txtunitario.Clear()
CheckBox1.Enabled = True
CheckBox2.Enabled = True
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
CheckBox1.Text = Format((Val(txttotal.Text)) +
(Val(txttotal.Text) * 0.15), "###.00")
If CheckBox1.Checked = True Then
CheckBox2.Enabled = False
ElseIf CheckBox1.Checked = False Then
CheckBox2.Enabled = True
CheckBox1.Enabled = False
End If
End Sub
PROGRAMACION I U.T.A 5to “U”
27 FCHE DIEGO CHICAIZA
Private Sub CheckBox2_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox2.CheckedChanged
CheckBox2.Text = Format((Val(txttotal.Text)) -
(Val(txttotal.Text) * 0.2), "###.00")
If CheckBox2.Checked = True Then
CheckBox1.Enabled = False
ElseIf CheckBox2.Checked = False Then
CheckBox1.Enabled = True
CheckBox2.Enabled = True
End If
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
28 FCHE DIEGO CHICAIZA
Escojemos el tipo de licor que deseamos.
Ahora nos aparecera si deseamos pagar de forma de contado o a credito.
PROGRAMACION I U.T.A 5to “U”
29 FCHE DIEGO CHICAIZA
CONCLUSION.
El programa anterior prodremos observar que con el combobox podemosescojer una
opcion y además se puede visualizar una imagen que se haya escojigo o descargado del
internet.
EJERCICIO 7
Diseñe una aplicación utilizando los números randomicos
En este programa veremos cómo manejar números randomicos para lo cual
realizaremos un proyecto llamado casino
En este proyecto utilizamos algunos objetos como:
Utilizaremos un FORM1
Form1
Utilizaremos los siguientes label
Label1=Título principal (Casino)
Label2=son los subtítulos ( 0 )
Label3=son los subtítulos ( 0 )
Label4=son los subtítulos ( 0 )
Utilizaremos dos botones.
Button1= Para el botón Jugar (cmdjugar)
Button2= Para el botón salir (cmdsalir)
Utilizaremos dos picturebox
Picturebox1= Utilizaremos para agregar la primera imagen
PictureBox2= Utilizaremos para agregar la segunda imagen
CODIFICACION DEL PROGRAMA.
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim n1 As Byte
Dim n2 As Byte
PROGRAMACION I U.T.A 5to “U”
30 FCHE DIEGO CHICAIZA
Dim n3 As Byte
Randomize()
Do
n1 = Int(Rnd() * 10)
n2 = Int(Rnd() * 10)
n3 = Int(Rnd() * 10)
Loop While (n1 > 1) And (n1 <= 6)
Label2.Text = n1
Label3.Text = n2
Label4.Text = n3
If (Label2.Text = Label3.Text) And (Label2.Text = Label4.Text)
Then
PictureBox1.Visible = True
PictureBox2.Visible = False
MsgBox("Felicidades Ganaste")
Else
PictureBox2.Visible = True
PictureBox1.Visible = False
MsgBox("Fallaste Intentalo nuevamente")
End If
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
31 FCHE DIEGO CHICAIZA
Ahora comenzaremos a jugar el casino.
EJERCICIO 8
Desarrollo de una proforma de las partes del computador
Utilizaremos un form1
Form1
Utilizaremos los siguientes labels.
Label1= Venta de pc y accesorios.
Label2= Ingrese el usuario.
Label3= Ingrese la contraseña.
Utilizaremos textbox-
Txtunuario.
Txtcontraseña.
Utilizaremos un form2
Form2
Utilizaremos un picturobox.
PROGRAMACION I U.T.A 5to “U”
32 FCHE DIEGO CHICAIZA
Picturebox.
Utilizaremos los siguientes label.
Label1= Mainboard
Label2= Memoria RAM
Label3= Disco duro
Label4= Unidades opticas
Label5= Monitor
Label6= Procesador
Label7= Cantidad
Label8= Precio Unitario
Label9= Subtotal
Label10= Valor del precio.
Label11= Forma de pago
Label12= Valor a cancelar.
Utilizaremos los soguientes combobox.
Combobox1
Combobox2
Combobox3
Combobox4
Combobox5
Combobox6
Utilizaremos los siguientes textbox.
Txtcantidad1
Txtcantidad2
Txtcantidad3
Txtcantidad4
Txtcantidad5
Txtcantidad6
Txtunitario1
Txtunitario2
Txtunitario3
Txtunitario4
Txtunitario5
Txtunitario6
Txtsubtotal1
Txtsubtotal2
Txtsubtotal3
Txtsubtotal4
PROGRAMACION I U.T.A 5to “U”
33 FCHE DIEGO CHICAIZA
Txtsubtotal5
Txtsubtotal6
Txtvalor1
Txtvalor2
Txtvalor3
Txtvalor4
Txtvalor5
Txtvalor6
Txtiva1
Txtiva2
Txtiva3
Txtiva4
Txtiva5
Txtiva6
Txtcancelar
Utilizaremos un checkbox.
Checkbox1
Utilizaremos los siguientes botones.
Button1= Limpiar valores
Button2= Regresar al menu principal
Button3= Finalizar.
CODIFICACIÓN DEL PROGRAMA.
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
If txtcontraseña.Text = 1234 Then
Me.Hide()
Form2.Show()
Else
MsgBox(" INGRESE NUEVAMENTE LA CONTRASEÑA ")
txtcontraseña.Focus()
txtcontraseña.SelectionStart = 0
txtcontraseña.Text = ""
End If
End Sub
Private Sub txtcontraseña_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcontraseña.TextChanged
End Sub
End Class
(FORM2)
PROGRAMACION I U.T.A 5to “U”
34 FCHE DIEGO CHICAIZA
Public Class Form2
Dim datos1, datos2, datos3, datos4, datos5, datos6 As Double
Dim datos As Integer
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
datos = ComboBox1.SelectedIndex
If datos = 0 Then
txtunitario1.Text = (Val("120.85"))
datos1 = txtunitario1.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\MAINBOARDAMD.jpg")
ElseIf datos = 1 Then
txtunitario1.Text = (Val("130.45"))
datos1 = txtunitario1.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\MAINBOARDINTEL.jpg")
ElseIf datos = 2 Then
txtunitario1.Text = (Val("149.59"))
datos1 = txtunitario1.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\MAINBOARDBIOSTAR.jpg")
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
datos = ComboBox2.SelectedIndex
If datos = 0 Then
txtunitario2.Text = (Val("30.45"))
datos2 = txtunitario2.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\DDR1MARKVISION.jpg")
ElseIf datos = 1 Then
txtunitario2.Text = (Val("35.90"))
datos2 = txtunitario2.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\DDR2-1GB
KINGSTON.jpg")
ElseIf datos = 2 Then
txtunitario2.Text = (Val("15.67"))
datos2 = txtunitario2.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\DDR2-512MB.jpg")
ElseIf datos = 3 Then
txtunitario2.Text = (Val("20.45"))
datos2 = txtunitario2.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\DDR512MB.jpg")
End If
End Sub
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox3.SelectedIndexChanged
datos = ComboBox3.SelectedIndex
If datos = 0 Then
txtunitario3.Text = (Val("68.75"))
datos3 = txtunitario3.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\HITACHI160GB.jpg")
ElseIf datos = 1 Then
txtunitario3.Text = (Val("120.32"))
datos3 = txtunitario3.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\MAXTOR500GB.jpg")
PROGRAMACION I U.T.A 5to “U”
35 FCHE DIEGO CHICAIZA
ElseIf datos = 2 Then
txtunitario3.Text = (Val("146.65"))
datos3 = txtunitario3.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\SAMSUMG1TB.jpg")
ElseIf datos = 3 Then
txtunitario3.Text = (Val("130.23"))
datos3 = txtunitario3.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\SEAGATE500GBSATA.jpg")
End If
End Sub
Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox4.SelectedIndexChanged
datos = ComboBox4.SelectedIndex
If datos = 0 Then
txtunitario4.Text = (Val("45.10"))
datos4 = txtunitario4.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\CDDVDLG.jpg")
ElseIf datos = 1 Then
txtunitario4.Text = (Val("38.98"))
datos4 = txtunitario4.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\CDDVDROMASUS.jpg")
End If
End Sub
Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox5.SelectedIndexChanged
datos = ComboBox5.SelectedIndex
If datos = 0 Then
txtunitario5.Text = (Val("250.23"))
datos5 = txtunitario5.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\MONITORHPTOUCHSCREEM.jpg")
ElseIf datos = 1 Then
txtunitario5.Text = (Val("198,44"))
datos5 = txtunitario5.Text
PictureBox1.Load("J:\PARTES COMPUTADORA\MONITORLGLCD.jpg")
ElseIf datos = 2 Then
txtunitario5.Text = (Val("230.45"))
datos5 = txtunitario5.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\MONITORLGLCDLED.jpg")
End If
End Sub
Private Sub ComboBox6_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox6.SelectedIndexChanged
datos = ComboBox6.SelectedIndex
If datos = 0 Then
txtunitario6.Text = (Val("89.34"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORAMDOPTERON.jpg")
ElseIf datos = 1 Then
txtunitario6.Text = (Val("95.31"))
datos6 = txtunitario6.Text
PROGRAMACION I U.T.A 5to “U”
36 FCHE DIEGO CHICAIZA
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORAMDSEMRON.jpg")
ElseIf datos = 2 Then
txtunitario6.Text = (Val("100.01"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORATHLONX2.jpg")
ElseIf datos = 3 Then
txtunitario6.Text = (Val("110.34"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORINTELCORE2DUO.jpg")
ElseIf datos = 4 Then
txtunitario6.Text = (Val("120.89"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORINTELDUALCORE.jpg")
ElseIf datos = 5 Then
txtunitario6.Text = (Val("145.54"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORINTELCOREi3.jpg")
ElseIf datos = 6 Then
txtunitario6.Text = (Val("168.99"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORINTELCOREi5.jpg")
ElseIf datos = 7 Then
txtunitario6.Text = (Val("188.99"))
datos6 = txtunitario6.Text
PictureBox1.Load("J:\PARTES
COMPUTADORA\PROCESADORINTELCOREi7.jpg")
End If
End Sub
Private Sub txtcantidad1_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad1.TextChanged
txtsubtotal1.Text = Format((Val(txtcantidad1.Text) * datos1),
"##.000")
txtiva1.Text = Format((Val(txtsubtotal1.Text) * 0.12),
"##.000")
txtvalor1.Text = Format((Val(txtsubtotal1.Text)) +
(Val(txtiva1.Text)))
End Sub
Private Sub txtcantidad2_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad2.TextChanged
txtsubtotal2.Text = Format(Val(txtcantidad2.Text) * datos2,
"##.000")
txtiva2.Text = Format((Val(txtsubtotal2.Text)) * 0.12,
"##.000")
txtvalor2.Text = Format((Val(txtsubtotal2.Text)) +
(Val(txtiva2.Text)))
End Sub
Private Sub txtcantidad3_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad3.TextChanged
PROGRAMACION I U.T.A 5to “U”
37 FCHE DIEGO CHICAIZA
txtsubtotal3.Text = Format(Val(txtcantidad3.Text) * datos3,
"##.000")
txtiva3.Text = Format((Val(txtsubtotal3.Text)) * 0.12,
"##.00")
txtvalor3.Text = Format((Val(txtsubtotal3.Text)) +
(Val(txtiva3.Text)))
End Sub
Private Sub txtcantidad4_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad4.TextChanged
txtsubtotal4.Text = Format((Val(txtcantidad4.Text) * datos4),
"##.000")
txtiva4.Text = Format(((Val(txtsubtotal4.Text)) * 0.12),
"##.000")
txtvalor4.Text = Format((Val(txtsubtotal4.Text)) +
(Val(txtiva4.Text)))
End Sub
Private Sub txtcantidad5_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad5.TextChanged
txtsubtotal5.Text = Format((Val(txtcantidad5.Text) * datos5),
"##.000")
txtiva5.Text = Format((Val(txtsubtotal5.Text) * 0.12),
"##.000")
txtvalor5.Text = Format((Val(txtiva5.Text)) +
(Val(txtsubtotal5.Text)))
End Sub
Private Sub txtcantidad6_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtcantidad6.TextChanged
txtsubtotal6.Text = Format((Val(txtcantidad6.Text) * datos6),
"##.00")
txtiva6.Text = Format((Val(txtsubtotal6.Text) * 0.12),
"##.000")
txtvalor6.Text = Format((Val(txtsubtotal6.Text)) +
(Val(txtiva6.Text)), "##.000")
txtcancelar.Text = Format(((Val(txtvalor1.Text)) +
(Val(txtiva1.Text))) + ((Val(txtvalor2.Text)) + (Val(txtiva2.Text))) +
((Val(txtvalor3.Text)) + (Val(txtiva3.Text))) + ((Val(txtvalor4.Text))
+ (Val(txtiva4.Text))) + ((Val(txtvalor5.Text)) + (Val(txtiva5.Text)))
+ ((Val(txtvalor6.Text)) + (Val(txtiva6.Text))), "##.000")
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
CheckBox1.Text = Format((Val(txtcancelar.Text)) +
(Val(txtcancelar.Text)) * 0.15, "##.000")
If CheckBox1.Checked = True Then
CheckBox2.Enabled = False
ElseIf CheckBox1.Checked = False Then
CheckBox2.Enabled = True
CheckBox1.Enabled = False
End If
End Sub
PROGRAMACION I U.T.A 5to “U”
38 FCHE DIEGO CHICAIZA
Private Sub CheckBox2_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox2.CheckedChanged
CheckBox2.Text = Format((Val(txtcancelar.Text)) -
(Val(txtcancelar.Text)) * 0.2, "##.000")
If CheckBox2.Checked = True Then
CheckBox1.Enabled = False
ElseIf CheckBox2.Checked = False Then
CheckBox1.Enabled = True
CheckBox2.Enabled = True
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
txtcantidad1.Text = ""
txtcantidad2.Text = ""
txtcantidad3.Text = ""
txtcantidad4.Text = ""
txtcantidad5.Text = ""
txtcantidad6.Text = ""
txtsubtotal1.Text = ""
txtsubtotal2.Text = ""
txtsubtotal3.Text = ""
txtsubtotal4.Text = ""
txtsubtotal5.Text = ""
txtsubtotal6.Text = ""
txtvalor1.Text = ""
txtvalor2.Text = ""
txtvalor3.Text = ""
txtvalor4.Text = ""
txtvalor5.Text = ""
txtvalor6.Text = ""
txtiva1.Text = ""
txtiva2.Text = ""
txtiva3.Text = ""
txtiva4.Text = ""
txtiva5.Text = ""
txtiva6.Text = ""
txtcancelar.Text = ""
txtunitario1.Text = ""
txtunitario2.Text = ""
txtunitario3.Text = ""
txtunitario4.Text = ""
txtunitario5.Text = ""
txtunitario6.Text = ""
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
End
End Sub
PROGRAMACION I U.T.A 5to “U”
39 FCHE DIEGO CHICAIZA
Private Sub txtcancelar_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtcancelar.TextChanged
End Sub
End Class
EJECUCION DEL PROGRAMA.
Esta es la imagen cuando hayamos ingresado los datos requeridos.
EJERCICIO 9
PROGRAMACION I U.T.A 5to “U”
40 FCHE DIEGO CHICAIZA
EL SISTEMA SOLAR
Tema:
Diseñe una aplicación que me permita conocer y obtener información de los planetas
del sistema solar.
Primeramente debemos crear una aplicación de Windows Forms
El Sistema Solar, vamos a agregarle una primera pantalla de presentación con distintos
botones o labels que nos vinculan a los otros formularios:
Utilizaremos un label.
Label1= Sistema solar.
Utilizaremos un combobox.
Combobox1
Utilizaremos un picturebox.
Picturebox1
Utilizaremos un textbox.
Textbox1
CODIFICACIÓN DEL PROGRAMA.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("MERCURIO")
ComboBox1.Items.Add("VENUS")
ComboBox1.Items.Add("TEIRRA")
ComboBox1.Items.Add("JUPITER")
ComboBox1.Items.Add("SATURNO")
ComboBox1.Items.Add("URANO")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
Select Case (ComboBox1.SelectedIndex)
Case Is = 0
TextBox1.Text = " Mercurio es el planeta del Sistema
Solar más próximo al Sol y el más pequeño.Antiguamente se pensaba que
Mercurio siempre presentaba la misma cara al Sol, Al ser un planeta
cuya órbita es inferior a la de la Tierra, Mercurio periódicamente
pasa delante del Sol, fenómeno que se denomina tránsito astronómico
(ver tránsito de Mercurio). Observaciones de su órbita a través de
muchos años demostraron que el perihelio gira 43 de arco más por siglo
de lo predicho por la mecánica clásica de Newton. Esta discrepancia
llevó a un astrónomo francés, Urbain Le Verrier, a pensar que existía
un planeta aún más cerca del Sol, al cual llamaron Vulcano, que
perturbaba la órbita de Mercurio. Ahora se sabe que Vulcano no existe;
PROGRAMACION I U.T.A 5to “U”
41 FCHE DIEGO CHICAIZA
la explicación correcta del comportamiento del perihelio de Mercurio
se encuentra en la Teoría General de la Relatividad."
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\MERCURIO.jpg")
PictureBox2.Image = ImageList1.Images(0)
Case Is = 1
TextBox1.Text = " Venus recibe su nombre en honor a
Venus, la diosa romana del amor. La órbita de Venus es una elipse con
una excentricidad de menos del 1%, formando la órbita más circular de
todos los planetas; apenas supera la de Neptuno. Su presión
atmosférica es 90 veces superior a la terrestre; es por tanto la mayor
presión atmosférica de todos los planetas rocosos"
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\VENUS.jpg")
PictureBox2.Image = ImageList1.Images(1)
Case Is = 2
TextBox1.Text = ("La Tierra se formó hace
aproximadamente 4567 millones de años y la vida surgió unos mil
millones de años después.17 Es el hogar de millones de especies,
incluyendo los seres humanos y actualmente el único cuerpo astronómico
donde se conoce la existencia de vida.18 La atmósfera y otras
condiciones abióticas han sido alteradas significativamente por la
biosfera del planeta, favoreciendo la proliferación de organismos
aerobios, así como la formación de una capa de ozono que junto con el
campo magnético terrestre bloquean la radiación solar dañina,
permitiendo así la vida en la Tierra.19 Las propiedades físicas de la
Tierra, la historia geológica y su órbita han permitido que la vida
siga existiendo. Se estima que el planeta seguirá siendo capaz de
sustentar vida durante otros 500 millones de años, ya que según las
previsiones actuales, pasado ese tiempo la creciente luminosidad del
Sol terminará causando la extinción de la biosfera.20 21")
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\TIERRA.jpg")
PictureBox2.Image = ImageList1.Images(2)
Case Is = 3
TextBox1.Text = ("Júpiter es el quinto planeta del
Sistema Solar. Forma parte de los denominados planetas exteriores o
gaseosos. Recibe su nombre del dios romano Júpiter (Zeus en la
mitología griega). Se trata del planeta que ofrece un mayor brillo a
lo largo del año dependiendo de su fase. Es, además, después del Sol,
el mayor cuerpo celeste del Sistema Solar, con una masa casi dos veces
y media la de los demás planetas juntos (con una masa 318 veces mayor
que la de la Tierra y 3 veces mayor que la de Saturno).")
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\JUPITER.jpg")
PictureBox2.Image = ImageList1.Images(3)
Case Is = 4
TextBox1.Text = ("Saturno es el sexto planeta del
Sistema Solar, el segundo en tamaño y masa después de Júpiter y el
único con un sistema de anillos visible desde nuestro planeta. Su
nombre proviene del dios romano Saturno. Forma parte de los
denominados planetas exteriores o gaseosos, también llamados jovianos
por su parecido a Júpiter. El aspecto más característico de Saturno
son sus brillantes anillos. Antes de la invención del telescopio,
Saturno era el más lejano de los planetas conocidos y, a simple vista,
no parecía luminoso ni interesante. El primero en observar los anillos
fue Galileo en 1610,1 pero la baja inclinación de los anillos y la
baja resolución de su telescopio le hicieron pensar en un principio
que se trataba de grandes lunas. Christiaan Huygens con mejores medios
de observación pudo en 1659 observar con claridad los anillos. James
Clerk Maxwell en 1859 demostró matemáticamente que los anillos no
PROGRAMACION I U.T.A 5to “U”
42 FCHE DIEGO CHICAIZA
podían ser un único objeto sólido sino que debían ser la agrupación de
millones de partículas de menor tamaño. Las partículas que habitan en
los anillos de Saturno giran a una velocidad de 48 000 km/h, 15 veces
más rápido que una bala.")
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\SATURNO.jpg")
PictureBox2.Image = ImageList1.Images(4)
Case Is = 5
TextBox1.Text = ("Urano es el séptimo planeta del
Sistema Solar, el tercero en cuanto a mayor tamaño,Sir William
Herschel anunció su descubrimiento el 13 de marzo de 1781, ampliando
las fronteras conocidas del Sistema Solar hasta entonces por primera
vez en la historia moderna. Urano es también el primer planeta
descubierto por medio de un telescopio.Urano es similar en composición
a Neptuno, y los dos tienen una composición diferente de los otros dos
gigantes gaseosos (Júpiter y Saturno). Por ello, los astrónomos a
veces los clasifican en una categoría diferente, los gigantes helados.
La atmósfera de Urano, aunque es similar a la de Júpiter y Saturno por
estar compuesta principalmente de hidrógeno y helio, contiene una
proporción superior tanto de «hielos»nota 4 como de agua, amoníaco y
metano, junto con trazas de hidrocarburos.12 nota 5 Posee la atmósfera
planetaria más fría del Sistema Solar, con una temperatura mínima de
49 K (-224 °C). Asimismo, tiene una estructura de nubes muy compleja,
acomodada por niveles, donde se cree que las nubes más bajas están
compuestas de agua y las más altas de metano.12 En contraste, el
interior de Urano se encuentra compuesto principalmente de hielo y
roca.")
PictureBox1.Load("C:\Users\Lab6\Desktop\PLANETAS\URANO.jpg")
PictureBox2.Image = ImageList1.Images(5)
End Select
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Escojemos la opcion que deseamos.
PROGRAMACION I U.T.A 5to “U”
43 FCHE DIEGO CHICAIZA
CONCLUSION.
El textbox puede ser acoplado al tecto que ingresamos a la codificacion es una
herramienta muy útil para textos largos.
EJERCICIO 10
PROPIEDADES ALIMENTICIAS
Diseñar un formulario que me permita visualizar las propiedades alimenticias utilizando
la herramienta checkbox e imagelist para visualizar las imágenes y una descripcion de
ellas.
Este programa nos permite conocer algunas de las propiedades alimenticias y nos
muestra una imagen que la identifica.
Utilizaremos los siguientes label.
Label1: Para el Título.
Label2: Para el Subtítulo.
Label3: Para la descripcion de cada opcion de la lista.
Utilizaremos un CheckBox
CheckBox: Para desplegar la lista de opcines.
Utilizaremos los PictureBox
PictureBox1: Para visualizar la 1ª imagen realizada con el case.
PictureBox2: Para visualizar la 2ª imagen realizada con la Herramienta
ImageList.
Utilizaremos un Button
PROGRAMACION I U.T.A 5to “U”
44 FCHE DIEGO CHICAIZA
Button: Para finalizar el programa.
CODIFICACION DEL PROGRAMA.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
i.Items.Add("Cereales y tubérculos")
i.Items.Add("Verduras y hortalizas")
i.Items.Add("Leguminosas y alimentos de origen animal")
i.Items.Add("Grasas y azúcares")
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
i.SelectedIndexChanged
Select Case (i.SelectedIndex)
Case Is = 0
TextBox1.Text = "En el primer nivel de la pirámide se
encuentra el 60% de lo que consumimos diariamente en mayor cantidad,
rico en carbohidratos que aportan gran energía."
PictureBox1.Load("H:\QUINTO INFORMATICA\LOGICA DE
PROGRAMACION I\EJERCICIOS DE
PROGRAMACION\alimentos\imagenes\cereales1.jpg")
PictureBox2.Image = ImageList1.Images(0)
Case Is = 1
TextBox1.Text = "Este es el segundo nivel en la
pirámide, las verduras y hortalizas nos proveen gran cantidad de
vitaminas y fibras (lo que nos facilita el tránsito intestinal)."
PictureBox1.Load("H:\QUINTO INFORMATICA\LOGICA DE
PROGRAMACION I\EJERCICIOS DE
PROGRAMACION\alimentos\imagenes\verduras2.jpg")
PictureBox2.Image = ImageList1.Images(1)
Case Is = 2
TextBox1.Text = "Este grupo nos provee proteínas, lo
cual ayuda a tener un cuerpo fuerte y sano. Se recomienda el consumo
de pescado así como carnes blancas (conejo o aves) por su bajo
contenido en grasa. Las carnes aportan gran cantidad de proteínas y es
recomendable para una buena alimentación."
PictureBox1.Load("H:\QUINTO INFORMATICA\LOGICA DE
PROGRAMACION I\EJERCICIOS DE
PROGRAMACION\alimentos\imagenes\leguminosas1.jpg")
PictureBox2.Image = ImageList1.Images(2)
Case Is = 3
TextBox1.Text = "Si bien es cierto son necesarios
porque proporcionan mucha energía, sin embargo se recomienda un
consumo moderado por su alto contenido en colesterol, ellos forman la
punta de la pirámide."
PictureBox1.Load("H:\QUINTO INFORMATICA\LOGICA DE
PROGRAMACION I\EJERCICIOS DE
PROGRAMACION\alimentos\imagenes\grasas1.jpg")
PictureBox2.Image = ImageList1.Images(3)
End Select
End Sub
End Class
PROGRAMACION I U.T.A 5to “U”
45 FCHE DIEGO CHICAIZA
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Ahora escojemos el tipo de alimento que deseamos saber que vitaminas contienen.
PROGRAMACION I U.T.A 5to “U”
46 FCHE DIEGO CHICAIZA
EJERCICIO11
PLANILLA DE LUZ
Diseñe un proyecto que permita calcular la planilla de Luz eléctrica según los
siguientes condicionamientos.
Valide el ingreso de los datos en las cajas de texto de tal manera que solo
permita el ingreso de números
Valide los datos de la Lectura anterior y la Lectura actual de tal manera que la
lectura actual es siempre mayor que la lectura anterior
Se ingresan solo las lecturas anterior y actual y se genera automáticamente el
Total a Pagar
Proponga su propio diseño
La aplicación se genera n veces según lo decida el usuario
Programe todos los botones que considere necesarios
DESCRIPCIÓN
Este programa nos permite calcular el valor de consumo de luz eléctrica según los watts
consumidos y los recargos por alumbrado público, bomberos, y basura.
14 Label
PROGRAMACION I U.T.A 5to “U”
47 FCHE DIEGO CHICAIZA
Label 1 = EMPRESA ELECTRICA
Label 2 = Fecha
Label 3 = # Cuenta
Label 4 = Factura
Label 5 = Cliente
Label 6 = Lectura actual
Label 7 = Lectura anterior
Label 8 = Wat
Label 9 = RECARGOS
Label 10 = 3% Alumbrado P.
Label 11 = 4% Bomberos
Label 12 = 5% Basura
Label 13 = Total
Label 14 = Costo
12 Text Box
Text Box 1 para la fecha.
Text Box 2 para el # de Cuenta.
Text Box 3 para la factura.
Text Box 4 = txtcliente
Text Box 5 = txtanterior
Text Box 6 = txtactual
Text Box 7 = txtconsumo
Text Box 8 = txtacosto
Text Box 9 = txtalumbrado
Text Box 10 = txtbomberos
Text Box 11 = txtbasura
Text Box 12 = txttotal
CODIFICACION DEL PROGRAMA. Public Class Form1
Private Sub txtcliente_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtcliente.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtactual_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtactual.Click
If Val(txtactual.Text) > Val(txtanterior.Text) Then
txtconsumo.Text = Val(txtactual.Text) -
Val(txtanterior.Text)
Else
txtactual.Clear()
txtactual.Focus()
PROGRAMACION I U.T.A 5to “U”
48 FCHE DIEGO CHICAIZA
End If
txtcosto.Text = Val(txtconsumo.Text) * 0.09
txtalumbrado.Text = Val(txtcosto.Text) * 0.03
txtbomberos.Text = Val(txtcosto.Text) * 0.04
txtbasura.Text = Val(txtcosto.Text) * 0.05
txttotal.Text = Val(txtcosto.Text) + Val(txtalumbrado.Text) +
Val(txtbomberos.Text) + Val(txtbasura.Text)
End Sub
Private Sub txtactual_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtactual.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtanterior_KeyPress(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles
txtanterior.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
End Class
EMAGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
49 FCHE DIEGO CHICAIZA
Ingresamos los datos correspondientes.
EJERCICIO 12
ROL DE PAGOS.
Diseñe un programa que me permita visualizar un rol de pagos de una empresa.
Para el diseño del rol de pagos utilizaremos los siguientes componentes.
Utilizaremos form.
form1= para el rol de pagos
form2= para ingresar la clave del usuario
Utilizaremos los picturebox
picturebox1 = para poner una imagen en el form2 para la clave
Utilizaremos los label
cantidad 28
PROGRAMACION I U.T.A 5to “U”
50 FCHE DIEGO CHICAIZA
Utilizaremos los textbox.
textbox1= para ingresar el nombre del usuario
textbox2= para ingresar la ocntraseña del usuario
textbox3= para ingresar la cedula del empleado
textbox4= para ingresar el nombre del cargo
textbox5= para ingresar el telefono
textbox6= para ingresar el sueldo
textbox7= para ingresar la direccion
textbox8= para ingresar el iess
textbox9= para ingresar las multas
textbox10= para ingresar el telefono
textbox11=para calcular el descuento de las multas
textbox12=para ingresar el numero de las horas extras
textbox13=para calcular el total de las horas extras
textbox14=para ingresar el numero de cargo familiar
textbox15=para calcular el total de el cargo familiar
textbox16=para calcular el total de ingresos
textbox17=el total de egresos
textbox18=total a recibir
Utilizaremos unos button
button1 = para ingresar al siguiente formulario
button2= para calcular total de ingresos
button3 = para calcular total de egresos
button4= para iniciar otra persona
button5=para borrar y ingresar un nuevo datos
button6= para salir de la ejecucion
Utilizaremos un chekbox
chekbox 1 = para seleccionar si tiene prestamo o no
CODIFICACION DEL PROGRAMA.
Public Class Form1
Dim DATOS, aux, con As Integer
Dim DATOS1 As Double
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
DATOS = ComboBox1.SelectedIndex
If (DATOS = 0) Then
txtcedula.Text = "1804758963"
txtcargo.Text = "GERENTE"
txtsueldo.Text = Val("400")
'PictureBox1.Load("C:\ROL_PAGOS\gerente.jpg")
PROGRAMACION I U.T.A 5to “U”
51 FCHE DIEGO CHICAIZA
' txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 1) Then
txtcedula.Text = "1804785961"
txtcargo.Text = "SECRETARIA"
txtsueldo.Text = Val("320.50")
'PictureBox1.Load("C:\ROL_PAGOS\secretaria.jpg")
'txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 2) Then
txtcedula.Text = "1307845219"
txtcargo.Text = "MENSAJERO"
txtsueldo.Text = Val("100")
' PictureBox1.Load("C:\ROL_PAGOS\mensajero.jpg")
'txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 3) Then
txtcedula.Text = Val("1054785445")
txtcargo.Text = "ADMINISTRADOR"
txtsueldo.Text = Val("220")
'PictureBox1.Load("C:\ROL_PAGOS\ADMINISTRADOR.jpg")
'txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 4) Then
txtcedula.Text = Val("1084512589")
txtcargo.Text = "CONTADOR"
txtsueldo.Text = Val("350.50")
'PictureBox1.Load("C:\ROL_PAGOS\CONTADORA.jpg")
'txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 5) Then
txtcedula.Text = Val("1087451045")
txtcargo.Text = "VENDEDOR"
txtsueldo.Text = Val("150")
'PictureBox1.Load("C:\ROL_PAGOS\VENDEDOR.jpg")
'txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"##.00")
PROGRAMACION I U.T.A 5to “U”
52 FCHE DIEGO CHICAIZA
DATOS1 = txtsueldo.Text
End If
End Sub
Private Sub txtdirec_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtdirec.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txttele_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txttele.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtextras_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtextras.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txttofami_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txttofami.TextChanged
End Sub
Private Sub txtextras_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtextras.TextChanged
If Val(txtextras.Text) >= 1 And Val(txtextras.Text) <= 10 Then
aux = Val(txtsueldo.Text) * 6 / 100
txthextras.Text = Val(txtextras.Text) * aux
Else
MsgBox("Numero Invalido")
PROGRAMACION I U.T.A 5to “U”
53 FCHE DIEGO CHICAIZA
End If
End Sub
Private Sub txtfami_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtfami.TextChanged
If Val(txtfami.Text >= 2) Then
txttofami.Text = Format(Val(txtfami.Text) * 10.5,
"###.00")
Else
txttofami.Text = Format(Val(txtfami.Text) * 15.5,
"###.00")
End If
End Sub
Private Sub TextBox1_TextChanged_1(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtmultas.TextChanged
If Val(txttomultas.Text) >= 7 Then
txttomultas.Text = Val(txtsueldo.Text) * 20 / 100
Else
txttomultas.Text = Val(txtmultas.Text) * 3
End If
End Sub
Private Sub TextBox1_TextChanged_2(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtprestamos.TextChanged
If Val(txtprestamos.Text) = 6 Then
con = Val(txtmonto.Text) * 8 / 100
txtvalpresta.Text = Format((Val(txtmonto.Text) + con) / 6,
"###.00")
ElseIf Val(txtprestamos.Text) = 12 Then
con = (Val(txtmonto.Text) * 16 / 100)
txtvalpresta.Text = Format((Val(txtmonto.Text) + con) /
12, "###.00")
ElseIf Val(txtprestamos.Text) = 18 Then
con = (Val(txtmonto.Text) * 20 / 100)
txtvalpresta.Text = Format((Val(txtmonto.Text) + con) /
18, "###.00")
End If
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
txtprestamos.Visible = True
txtmonto.Visible = True
txtvalpresta.Visible = True
End Sub
Private Sub txtsueldo_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtsueldo.TextChanged
txtiees.Text = Format(Val(txtsueldo.Text) * 11.5 / 100,
"###.00")
End Sub
PROGRAMACION I U.T.A 5to “U”
54 FCHE DIEGO CHICAIZA
Private Sub txttorecibe_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txttorecibe.Click
txttorecibe.Text = Format(Val(txtingres.Text) -
Val(txtegresos.Text), "##.00")
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Form2.Show()
Me.Hide()
End Sub
Private Sub txtegresos_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtegresos.TextChanged
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
txtegresos.Text = Format(Val(txtiees.Text) +
Val(txttomultas.Text) + Val(txtvalpresta.Text), "###.00")
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
txtingres.Text = Format(Val(txtsueldo.Text) +
Val(txthextras.Text) + Val(txttofami.Text), "##.00")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button5.Click
txtdirec.Text = ""
txttele.Text = ""
txtingres.Text = ""
txtegresos.Text = ""
txtiees.Text = ""
txtmonto.Text = ""
txtprestamos.Text = ""
txtmultas.Text = ""
txttomultas.Text = ""
txtcargo.Text = ""
txttofami.Text = ""
txtsueldo.Text = ""
txtcargo.Text = ""
PROGRAMACION I U.T.A 5to “U”
55 FCHE DIEGO CHICAIZA
txtfami.Text = ""
txtextras.Text = ""
txttorecibe.Text = ""
txtsueldo.Text = ""
txthextras.Text = ""
txtvalpresta.Text = ""
txttorecibe.Text = ""
End Sub
End Class
IMAGENS DE LA EJECUCION DELPROGRAMA.
PROGRAMACION I U.T.A 5to “U”
56 FCHE DIEGO CHICAIZA
Ahora ingresamos los datos correspondientes.
EJERCICIO 13
SISTEMA DE CONTROL DE MATRICULAS.
Elaborar un programa que me permita realizar el ingreso de los datos de un estudiante al
sistema de matrículas, donde se me detalle los colegios y el tipo fiscal o particular, y se
me visualice el valor de la matrícula, servicio médico, internet y recreación, y el valor
total a pagar.
Descripción del ejercicio
En este ejercicio para el sistema de matrícula se desea ingresar los datos del estudiante y
poder seleccionar un colegio y el tipo ya sea fiscal, particular o fiscomisional.
También se bloquea los textbox donde se nos visualiza los valores de los seguros y el
total.
Objetos
1splitContainer
Utilizaremos los label.
Label1=sistema de recaudacion
Label2=datos personales
Label3=nombre
Label4=apellido
Label5=cedula
PROGRAMACION I U.T.A 5to “U”
57 FCHE DIEGO CHICAIZA
Label6=direccion
Label7=telefono
Label8=datos de matricula
Label9=valor matricula
Label10=servicio medico
Label11=servicio internet
Label12=servicio recreacion
Label13=total a pagar
Label14=tipo
Label15=colegio
Utilizaremos los textbox.
Textbox1=txtnombre
Textbox2=txtapellido
Textbox3=txtcedula
Textbox4=txtdireccion
Textbox5=txttelefono
Textbox6= txtvmatricula
Textbox7= txtsmedico
Textbox8= txtsinternet
Textbox9= txtsrecreacion
Textbox10= txttotal
Utilizaremos dos button
Button1=salir
Button2=nuevo
Utilizaremos dos Combobox
Combobox1=cmbcolegio
Combobox1=cmbtipo
CODIFICACION DEL PROGRAMA.
Public Class Form1
Dim dato As Integer
Private Sub NOMBRE_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles NOMBRE.KeyPress
If Char.IsNumber(e.KeyChar) Then
e.Handled = True
MsgBox("NO DATOS NUMERICOS")
NOMBRE.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
PROGRAMACION I U.T.A 5to “U”
58 FCHE DIEGO CHICAIZA
e.Handled = False
End If
End Sub
Private Sub APELLIDO_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles APELLIDO.KeyPress
If Char.IsNumber(e.KeyChar) Then
e.Handled = True
MsgBox("NO DATOS NUMERICOS")
APELLIDO.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = False
End If
End Sub
Private Sub CEDULA_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles CEDULA.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
MsgBox("SOLO DATOS NUMERICOS")
CEDULA.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = False
End If
End Sub
Private Sub TELEFONO_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TELEFONO.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
MsgBox("SOLO DATOS NUMERICOS")
TELEFONO.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = False
End If
End Sub
Private Sub VMATRICULA_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles VMATRICULA.TextChanged
End Sub
PROGRAMACION I U.T.A 5to “U”
59 FCHE DIEGO CHICAIZA
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Ingresamos los datos requeridos.
PROGRAMACION I U.T.A 5to “U”
60 FCHE DIEGO CHICAIZA
EJERCICIO 14
CONTROL DE NOTAS DE ESTUDIANTES.
Diseñe un programa que me permita visualizar un control de notas con su respectiva
equivalencia.
Diseño del proyecto.
Utilizaremos un form
Form1
Utilizaremos los textbox.
Textbox1
Txtnota1
Txtnota2
Txtnota3
Txtnota4
Txtnota5
Txtnota6
Txtnota7
Txtnota8
Txtnota9
Txtnota10
Txtnota11
Txtnota12
Txtnota13
Txtnota14
Txtnota15
Txtnota16
Txtnota17
Txtnota18
Txtpromedio1
Txtpromedio2
Txtpromedio3
Txtpromedio4
Txtpromedio5
Txtpromedio6
Txtequivalencia1
Txtequivalencia2
Txtequivalencia3
Txtequivalencia4
Txtequivalencia5
PROGRAMACION I U.T.A 5to “U”
61 FCHE DIEGO CHICAIZA
Txtequivalencia6
Utilizaremos los label.
Label1= Nombre
Label2= Semestre
Label3= Paralelo
Label4= Promedio
Label5= Equivalencia
Label6= Materia.
Label7
Label8
Label9
Label10
Label11
Label12=Promedio general
Label13= Equivalencia
Utilizaremos un button.
Button1=Verificar.
CODIFICACION DEL PROGRAMA.
Public Class Form1
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbsemestre.SelectedIndexChanged
Select Case (cmbsemestre.SelectedIndex)
Case Is = 0
lblmateria1.Text = "TRABAJO EN EQUIPO"
lblmateria2.Text = "INVESTIGACION"
lblmateria3.Text = "FISICA II"
lblmateria4.Text = "PROGRAMACION I"
lblmateria5.Text = "MATEMATICAS II"
lblmateria6.Text = "REALIDAD NACIONAL"
Case Is = 1
lblmateria1.Text = "PSICOLOGIA I"
lblmateria2.Text = "MATEMATICAS III"
lblmateria3.Text = "CIRCUITOS ELECTRICOS"
lblmateria4.Text = "MODELOS PEDAGOGICOS"
lblmateria5.Text = "PROGRAMACION II"
lblmateria6.Text = "TUTORIAS"
Case Is = 2
lblmateria1.Text = "PROBLEMAS DEL APRENDIZAJE"
lblmateria2.Text = "AQUITECTURA COMPU. II"
lblmateria3.Text = "GESTOR CENTROS COMPU."
lblmateria4.Text = "LOGICA PROG. I"
lblmateria5.Text = "PLANIFICACION CURRICULAR"
lblmateria6.Text = "HERRAMIENTAS MULTIMEDIA"
Case Is = 3
lblmateria1.Text = "PRACTICAS PREPROFESIONALES"
lblmateria2.Text = "SISTEMAS OPERATIVOS"
PROGRAMACION I U.T.A 5to “U”
62 FCHE DIEGO CHICAIZA
lblmateria3.Text = "PROGRAMACION WEB I"
lblmateria4.Text = "GESTION DE PROYECTOS"
lblmateria5.Text = "SISTEMATIZACION CONTABLE"
End Select
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
cmbsemestre.Items.Add("SEGUNDO SEMESTRE")
cmbsemestre.Items.Add("TERCER SEMESTRE")
cmbsemestre.Items.Add("QUINTO SEMESTRE")
cmbsemestre.Items.Add("SEPTIMO SEMESTRE")
ComboBox2.Items.Add("A")
ComboBox2.Items.Add("B")
ComboBox2.Items.Add("UNICO")
ComboBox2.Items.Add("UNICO")
End Sub
Private Sub txtnota3_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota3.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota3_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota3.TextChanged
If txtnota3.Text < 1 Or txtnota3.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
txtpromedio1.Text = Format(((Val((txtnota1.Text) +
(Val(txtnota2.Text)) + (Val(txtnota3.Text)))) / 3), "##.000")
If (Val(txtpromedio1.Text)) >= 7 Then
txtequivalencia1.Text = "APROBADO"
ElseIf (Val(txtpromedio1.Text)) >= 5 And
(Val(txtpromedio1.Text)) < 7 Then
txtequivalencia1.Text = "SUSPENSO"
ElseIf (Val(txtpromedio1.Text)) < 5 Then
txtequivalencia1.Text = "REPROBADO"
End If
End Sub
Private Sub txtnota6_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota6.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota6_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota6.TextChanged
If txtnota6.Text < 1 Or txtnota6.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
PROGRAMACION I U.T.A 5to “U”
63 FCHE DIEGO CHICAIZA
txtpromedio2.Text = Format(((Val((txtnota4.Text)) +
(Val(txtnota5.Text)) + (Val(txtnota6.Text)))) / 3, "##.000")
If (Val(txtpromedio2.Text)) >= 7 Then
txtequivalencia2.Text = "APROBADO"
ElseIf (Val(txtpromedio2.Text)) >= 5 And
(Val(txtpromedio2.Text)) < 7 Then
txtequivalencia2.Text = "SUSPENSO"
ElseIf (Val(txtpromedio1.Text)) < 5 Then
txtequivalencia2.Text = "REPROBADO"
End If
End Sub
Private Sub txtnota9_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota9.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota9_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota9.TextChanged
If txtnota9.Text < 1 Or txtnota9.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
txtpromedio3.Text = Format(((Val((txtnota7.Text)) +
(Val(txtnota8.Text)) + (Val(txtnota9.Text)))) / 3, "##.000")
If (Val(txtpromedio3.Text)) >= 7 Then
txtequivalencia3.Text = "APROBADO"
ElseIf (Val(txtpromedio3.Text)) >= 5 And
(Val(txtpromedio3.Text)) < 7 Then
txtequivalencia3.Text = "SUSPENSO"
ElseIf (Val(txtpromedio3.Text)) < 5 Then
txtequivalencia3.Text = "REPROBADO"
End If
End Sub
Private Sub txtnota12_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota12.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota12_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota12.TextChanged
If txtnota12.Text < 1 Or txtnota12.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
txtpromedio4.Text = Format(((Val((txtnota10.Text)) +
(Val(txtnota11.Text)) + (Val(txtnota12.Text)))) / 3, "##.000")
If (Val(txtpromedio4.Text)) >= 7 Then
txtequivalencia4.Text = "APROBADO"
PROGRAMACION I U.T.A 5to “U”
64 FCHE DIEGO CHICAIZA
ElseIf (Val(txtpromedio4.Text)) >= 5 And
(Val(txtpromedio4.Text)) < 7 Then
txtequivalencia4.Text = "SUSPENSO"
ElseIf (Val(txtpromedio4.Text)) < 5 Then
txtequivalencia4.Text = "REPROBADO"
End If
End Sub
Private Sub txtnota15_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota15.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota15_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota15.TextChanged
If txtnota15.Text < 1 Or txtnota15.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
txtpromedio5.Text = Format(((Val((txtnota13.Text)) +
(Val(txtnota14.Text)) + (Val(txtnota15.Text)))) / 3, "##.000")
If (Val(txtpromedio5.Text)) >= 7 Then
txtequivalencia5.Text = "APROBADO"
ElseIf (Val(txtpromedio5.Text)) >= 5 And
(Val(txtpromedio5.Text)) < 7 Then
txtequivalencia5.Text = "SUSPENSO"
ElseIf (Val(txtpromedio5.Text)) < 5 Then
txtequivalencia5.Text = "REPROBADO"
End If
End Sub
Private Sub txtnota18_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota18.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota18_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota18.TextChanged
If txtnota18.Text < 1 Or txtnota18.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
txtpromedio6.Text = Format(((Val((txtnota16.Text)) +
(Val(txtnota17.Text)) + (Val(txtnota18.Text)))) / 3, "##.000")
If (Val(txtpromedio6.Text)) >= 7 Then
txtequivalencia6.Text = "APROBADO"
ElseIf (Val(txtpromedio6.Text)) >= 5 And
(Val(txtpromedio6.Text)) < 7 Then
txtequivalencia6.Text = "SUSPENSO"
ElseIf (Val(txtpromedio6.Text)) < 5 Then
txtequivalencia6.Text = "REPROBADO"
PROGRAMACION I U.T.A 5to “U”
65 FCHE DIEGO CHICAIZA
End If
End Sub
Private Sub txtpromedio6_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
txtpromedio6.TextChanged
End Sub
Private Sub txtnota1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota1.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota1_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota1.TextChanged
If txtnota1.Text < 1 Or txtnota1.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota2_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota2.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota2_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota2.TextChanged
If txtnota2.Text < 1 Or txtnota2.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota4_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota4.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota4_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota4.TextChanged
If txtnota4.Text < 1 Or txtnota4.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
PROGRAMACION I U.T.A 5to “U”
66 FCHE DIEGO CHICAIZA
Private Sub txtnota5_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota5.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota5_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota5.TextChanged
If txtnota5.Text < 1 Or txtnota5.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota7_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota7.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota7_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota7.TextChanged
If txtnota7.Text < 1 Or txtnota7.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota8_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota8.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = True
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota8_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota8.TextChanged
If txtnota8.Text < 1 Or txtnota8.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota10_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota10.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
PROGRAMACION I U.T.A 5to “U”
67 FCHE DIEGO CHICAIZA
e.Handled = True
End If
End Sub
Private Sub txtnota10_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota10.TextChanged
If txtnota10.Text < 1 Or txtnota10.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota11_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota11.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota11_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota11.TextChanged
If txtnota11.Text < 1 Or txtnota11.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota13_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota13.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota13_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota13.TextChanged
If txtnota13.Text < 1 Or txtnota13.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota14_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota14.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota14_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota14.TextChanged
If txtnota14.Text < 1 Or txtnota14.Text > 10 Then
PROGRAMACION I U.T.A 5to “U”
68 FCHE DIEGO CHICAIZA
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota16_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota16.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota16_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota16.TextChanged
If txtnota16.Text < 1 Or txtnota16.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub txtnota17_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtnota17.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub txtnota17_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnota17.TextChanged
If txtnota17.Text < 1 Or txtnota17.Text > 10 Then
MsgBox("INGRESE NUEVAMENTE EL NUMERO")
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
txtpgeneral.Text = Format(((Val(txtpromedio1.Text) +
Val(txtpromedio2.Text) + Val(txtpromedio3.Text) +
Val(txtpromedio4.Text) + Val(txtpromedio5.Text) +
Val(txtpromedio6.Text)) / 6), "##.000")
End Sub
End Class
PROGRAMACION I U.T.A 5to “U”
69 FCHE DIEGO CHICAIZA
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Ingresamos los datos necesarios para la verificación del promedio y la equivalencia.
PROGRAMACION I U.T.A 5to “U”
70 FCHE DIEGO CHICAIZA
EJERCICIO 15
PRUEBA DEL PRIMER PARCIAL
1.- Abrir un nuevo proyecto en visual basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos la siguiente PictureBox
PictureBox1=imagen del auto
Utilizaremos 3 GroupBox
GroupBox1=Datos personales
GroupBox2=Datos del vehículo
GroupBox3=Valores totales
Utilizaremos 19 label.
Label1= Tema
Label2=Código
Label3= Nombre
Label4= Apellido
Label5=Cedula
Label6=Dirección
Label7=Teléfono
PROGRAMACION I U.T.A 5to “U”
71 FCHE DIEGO CHICAIZA
Label8=Tipo de vehículo
Label9=Valor
Label10=Color
Label11=Aire acondicionado
Label12= Vidrios eléctricos
Label13= Valor de venta
Label14=Comisión vendedor
Label15= Total comisión
Label16=Total a pagar
Utilizaremos los siguientes text box
Textbox1=txtnombres
Textbox2=txtapellido
Textbox3=txtcedula
Textbox4=txtdireccion
Textbox4=txttelefono
Textbox5=txttvehiculo
Textbox6=txtvalor
Textbox7=txtvalventa
Textbox8=txtcomvendedor
Textbox9=txttotcomision
Textbox10=txttotpagar
Utilizaremos los 5 combobox.
Combobox1= Para La Selección Del Código
Combobox2= Para La Selección Del Tipo De Vehículo
Combobox3= Para Seleccionar El Color Del Carro
Combobox4= Para La Selección Del Aire Acondicionado
Combobox5= Para La Selección De Vidrios Eléctricos
Utilizaremos 3 botones
Button1= Para Nuevo
Button2= Para Añadir Venta
Button3= Para Salir
4.-Codificacion
Public Class Form1
Dim a As Double
(CODIFICACION DEL PRIMER COMBOBOX)
PROGRAMACION I U.T.A 5to “U”
72 FCHE DIEGO CHICAIZA
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbcodigo.SelectedIndexChanged
Select Case (cmbcodigo.SelectedIndex)
Case Is = 0
txtnombre.Text = "Maria Emitelia"
txtapellido.Text = "Rosero Rosero"
txtci.Text = "1802456989"
txtdirec.Text = "Ambato"
txttelef.Text = "2825898"
Case Is = 1
txtnombre.Text = "Milto Gabriel "
txtapellido.Text = "Pallo Real"
txtci.Text = "1808856569"
txtdirec.Text = "Quito"
txttelef.Text = "0988623569"
Case Is = 2
txtnombre.Text = "Celso Anibal"
txtapellido.Text = "Jarrin Urrutia"
txtci.Text = "1801112532"
txtdirec.Text = "Riobamba"
txttelef.Text = "0999562254"
End Select
End Sub
(CODIFICACION DEL SEGUNDO COMBOBOX)
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbcarro.SelectedIndexChanged
Select Case (cmbcarro.SelectedIndex)
Case Is = 0
txtpresio.Text = 22000.0
PictureBox2.Load("C:\PRUEBA\camioneta.jpg")
If Val(txtpresio.Text) >= 22000 And
Val(txtpresio.Text) <= 25000 Then
txtvalorv.Text = Val(txtpresio.Text)
txtcomi.Text = Val(txtvalorv.Text) * 0.04
End If
txttotal.Text = Val(txtcomi.Text) + Val(txttotal.Text)
txttapagar.Text = Val(txttotal.Text) +
Val(txttapagar.Text)
Case Is = 1
txtpresio.Text = 25000.0
PictureBox2.Load("C:\PRUEBA\auto.jpg")
If Val(txtpresio.Text) >= 22000 And
Val(txtpresio.Text) <= 25000 Then
txtvalorv.Text = Val(txtpresio.Text)
txtcomi.Text = Val(txtvalorv.Text) * 0.04
End If
txttotal.Text = Val(txtcomi.Text) + Val(txttotal.Text)
txttapagar.Text = Val(txttotal.Text) +
Val(txttapagar.Text)
Case Is = 2
txtpresio.Text = 35000.0
PictureBox2.Load("C:\PRUEBA\furgon.jpg")
If Val(txtpresio.Text) > 25000 And Val(txtpresio.Text)
<= 35000 Then
txtvalorv.Text = Val(txtpresio.Text)
txtcomi.Text = Val(txtvalorv.Text) * 0.05
End If
PROGRAMACION I U.T.A 5to “U”
73 FCHE DIEGO CHICAIZA
txttotal.Text = Val(txtcomi.Text) + Val(txttotal.Text)
txttapagar.Text = Val(txttotal.Text) +
Val(txttapagar.Text)
End Select
End Sub
(CODIFICACION DEL TERCER COMBOBOX)
Private Sub cmbcolor_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmbcolor.SelectedIndexChanged
Select Case (cmbcolor.SelectedIndex)
Case Is = 0
PictureBox1.Load("C:\PRUEBA\negro.jpg")
Case Is = 1
PictureBox1.Load("C:\PRUEBA\blanco.jpg")
Case Is = 2
PictureBox1.Load("C:\PRUEBA\gris.jpg")
Case Is = 3
PictureBox1.Load("C:\PRUEBA\rojo.jpg")
Case Is = 4
PictureBox1.Load("C:\PRUEBA\azul.jpg")
End Select
End Sub
(CODIFICACION DEL BOTTON1)
Private Sub cmdlimpiar_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdlimpiar.Click
txtnombre.Text = ""
txtapellido.Text = ""
txtci.Text = ""
txtdirec.Text = ""
txttelef.Text = ""
txtvalorv.Text = ""
txtcomi.Text = ""
txttotal.Text = ""
cmbcarro.Text = ""
cmbcodigo.Text = ""
cmbaire.Text = ""
cmbcolor.Text = ""
cmbvidrio.Text = ""
(CODIFICACION DEL BOTTON2)
Private Sub cmdañadir_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdañadir.Click
txtcomi.Text = ""
txtvalorv.Text = ""
cmbaire.Text = ""
cmbcolor.Text = ""
cmbvidrio.Text = ""
cmbcarro.Text = ""
txtpresio.Text = ""
PictureBox1.Load("C:\PRUEBA\blanco.jpg")
PictureBox2.Load("C:\PRUEBA\blanco.jpg")
(CODIFICACION DEL BOTTON3)
PROGRAMACION I U.T.A 5to “U”
74 FCHE DIEGO CHICAIZA
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
End
End Sub
5.- Corrido del programa
EJERCICIO 16
EXAMEN DEL PRIMER PARCIAL
Objetivo: Determinar el nivel de asimilación sobre los elementos tratados, utilizando
un lenguaje de programación Visual.
Instructivo:
Aplique el razonamiento lógico para resolver la situación problémica planteada
Utilice correctamente las sentencias de programación
Estructure el programa en forma correcta para obtener los resultados requeridos
La evaluación tiene 2 partes, una teórica y otra práctica
La parte teórica se lo realizará en el Aula Virtual y tendrá una valoración de 1 punto
La parte práctica tendrá una valoración de 9 puntos
Equivalencia
El desarrollo del programa equivale a 9 puntos
4 puntos el correcto funcionamiento del programa
1 punto el diseño adecuado
2 puntos el proceso de validación de información
2 puntos la acumulación de información y la presentación correcta de resultados
FECHA: 13/11/2012
NOMBRE: 1.- Se necesita automatizar el proceso de escalafón de los docentes de la Carrera de
Docencia en Informática de la Facultad de Ciencias Humanas y de la Educación de la
Universidad Técnica Ambato, bajo los siguientes parámetros.
PROGRAMACION I U.T.A 5to “U”
75 FCHE DIEGO CHICAIZA
1.- Se trabaja en un formato de Fichas
2.- La Ficha Datos Personales permite el ingreso de información personal del docente
Cedula
Nombres
Dirección
Teléfono
3.- La Ficha Estudios Realizados permite el ingreso de los siguientes Datos
Título Obtenido Magister 200
PHD 300
Tercer Nivel 100
Méritos Mejor Egresado 100
Reconocimientos 50
Publicaciones Libros 100
Revistas 50
Artículos Indexados 50
PROGRAMACION I U.T.A 5to “U”
76 FCHE DIEGO CHICAIZA
Idiomas Hablar, Leer, Escribir 50
Leer, Entender 30
Proyectos Investigación 30
Vinculación 30
Otros 10
Cada escala equivale a 200 puntos para realizar un ascenso.
Determine la escala que le corresponde al docente y el sueldo promedio, considerando
que todos los docentes ganan Usd 540, y por cada escala le corresponde Usd 200,00
adicionales.
Obtenga el total de docentes por cada escala y el valore acumulado correspondiente al
sueldo, el proceso es repetitivo.
Examen
Utilizaremos un tabcontrol para realizar nuestro programa de forma adecuada y
ordenada
Utilizaremos dos botones para el blanqueamiento y salir de todo el programa.
En el siguiente programa utilizaremos los siguientes label.
Label1= tema del examen
Label2=nombre
Label3=dirección
Label4= cedula
Label5=teléfono
Label6=detalle
Label7=tipo
Label8=valor parcial
Label9=valor total
Label10=título obtenido
Label11= méritos
Label12= publicaciones
Label13= idiomas
Label14=proyectos
Label15= total de puntos
Label16=escala
Label17=sueldo
Label18=nivel 1
Label19=nivel 2
Label20=nivel 3
Label21 =nivel 4
Label22= nivel 5
Label23= número de docentes
Label24= sueldo total
PROGRAMACION I U.T.A 5to “U”
77 FCHE DIEGO CHICAIZA
Utilizaremos los siguientes texbox
Textbox1=txtnombres
Textbox2=txtdireccion
Textbox3=cedula
Textbox4=txttelefono
Textbox5=txttitulo
Textbox6=txtmeri
Textbox7=txtvpubli
Textbox8=txtvidio
Textbox9=txtproyec
Textbox10=txtitotal
Textbox11=txtmertotal
Textbox12=txtpublitotal
Textbox13=txtidiototal
Textbox14=txtproyetotal
Textbox15=txtpuntos
Textbox16=txtescala
Textbox17=txtsueldo
Textbox18=txtn1
Textbox19=txtn2
Textbox20=txtn3
Textbox21=txtn4
Textbox22=txtn5
Textbox23=txtsuel1
Textbox24=txtsuel2
Textbox25=txtsuel3
Textbox26=txtsuel4
Textbox27=txtsuel5
Utilizaremos los siguientes combobox.
Combobox1= para el ingreso de los títulos obtenidos
Combobox2= para el ingreso de los méritos obtenidos
Combobox3= para el ingreso de las publicaciones
Combobox4= para el ingreso de los idiomas culminados
Combobox5= para el ingreso de los proyectos realiazados
Utilizaremos un botón para limpiar los textbox y combobox
txttitulo.Text = ""
txtvmeri.Text = ""
txtvpubli.Text = ""
txtvidio.Text = ""
PROGRAMACION I U.T.A 5to “U”
78 FCHE DIEGO CHICAIZA
txtproyec.Text = ""
txttitotal.Text = ""
txtmertotal.Text = ""
txtpublitotal.Text = ""
txtidiototal.Text = ""
txtproyetotal.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
ComboBox5.Text = ""
txtpuntos.Text = ""
txtsueldo.Text = ""
txtescala.Text = ""
txtnombres.Text = ""
txtcedula.Text = ""
txtdireccion.Text = ""
txttelefono.Text = ""
Utilizaremos un botón para finalizar el programa.
End
CODIFICACION
Public Class Form1
(CODIFICACION DEL PRIMER COMBOBOX)
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox1.SelectedIndexChanged
Select Case (ComboBox1.SelectedIndex)
Case Is = 0
txttitulo.Text = 200
Case Is = 1
txttitulo.Text = 300
Case Is = 2
txttitulo.Text = 100
End Select
txttitotal.Text = Val(txttitulo.Text) + Val(txttitotal.Text)
End Sub
(CODIFICACION DEL SEGUNDO COMBOBOX)
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
Select Case (ComboBox2.SelectedIndex)
Case Is = 0
txtvmeri.Text = 100
Case Is = 1
txtvmeri.Text = 50
End Select
txtmertotal.Text = Val(txtmertotal.Text) + Val(txtvmeri.Text)
End Sub
PROGRAMACION I U.T.A 5to “U”
79 FCHE DIEGO CHICAIZA
(CODIFICACION DEL TERCER COMBOBOX)
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox3.SelectedIndexChanged
Select Case (ComboBox3.SelectedIndex)
Case Is = 0
txtvpubli.Text = 100
Case Is = 1
txtvpubli.Text = 50
Case Is = 2
txtvpubli.Text = 50
End Select
txtpublitotal.Text = Val(txtvpubli.Text) +
Val(txtpublitotal.Text)
End Sub
(CODIFICACION DEL CUARTO COMBOBOX)
Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox4.SelectedIndexChanged
Select Case (ComboBox4.SelectedIndex)
Case Is = 0
txtvidio.Text = 50
Case Is = 1
txtvidio.Text = 30
End Select
txtidiototal.Text = Val(txtidiototal.Text) +
Val(txtvidio.Text)
End Sub
(CODIFICACION DEL QUINTO COMBOBOX Y TAMBIEN CODIFICAREMOS PARA EL QUE
SE VISUALIZE EL PRECIO TOTAL Y LA ESCALA DE PUNTOS)
Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox5.SelectedIndexChanged
Dim a As Byte
Select Case (ComboBox5.SelectedIndex)
Case Is = 0
txtproyec.Text = 30
Case Is = 1
txtproyec.Text = 30
Case Is = 2
txtproyec.Text = 10
End Select
txtproyetotal.Text = Val(txtproyetotal.Text) +
Val(txtproyec.Text)
txtpuntos.Text = Val(txttitotal.Text) + Val(txtmertotal.Text)
+ Val(txtpublitotal.Text) + Val(txtidiototal.Text) +
Val(txtproyetotal.Text)
If Val(txtpuntos.Text) >= 200 And Val(txtpuntos.Text) <= 399
Then
txtescala.Text = "Nivel 1"
txtsueldo.Text = 740
a = 1
txtn1.Text = a + Val(txtn1.Text)
txtsuel1.Text = Val(txtsuel1.Text) + Val(txtsueldo.Text)
PROGRAMACION I U.T.A 5to “U”
80 FCHE DIEGO CHICAIZA
ElseIf Val(txtpuntos.Text) >= 400 And Val(txtpuntos.Text) <=
599 Then
txtescala.Text = "Nivel 2"
txtsueldo.Text = 940
a = 1
txtn2.Text = a + Val(txtn2.Text)
txtsuel2.Text = Val(txtsuel2.Text) + Val(txtsueldo.Text)
ElseIf Val(txtpuntos.Text) >= 600 And Val(txtpuntos.Text) <=
799 Then
txtescala.Text = "Nivel 3"
txtsueldo.Text = 1140
a = 1
txtn3.Text = a + Val(txtn3.Text)
txtsuel3.Text = Val(txtsuel3.Text) + Val(txtsueldo.Text)
ElseIf Val(txtpuntos.Text) >= 800 And Val(txtpuntos.Text) <=
999 Then
txtescala.Text = "Nivel 4"
txtsueldo.Text = 1340
a = 1
txtn4.Text = a + Val(txtn4.Text)
txtsuel4.Text = Val(txtsuel4.Text) + Val(txtsueldo.Text)
ElseIf Val(txtpuntos.Text) >= 1000 Then
txtescala.Text = "Nivel 5"
txtsueldo.Text = 1540
a = 1
txtn5.Text = a + Val(txtn5.Text)
txtsuel5.Text = Val(txtsuel5.Text) + Val(txtsueldo.Text)
End If
End Sub
(BLANQUEAMIENTO DE LOS TEXTBOX)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
txttitulo.Text = ""
txtvmeri.Text = ""
txtvpubli.Text = ""
txtvidio.Text = ""
txtproyec.Text = ""
txttitotal.Text = ""
txtmertotal.Text = ""
txtpublitotal.Text = ""
txtidiototal.Text = ""
txtproyetotal.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
ComboBox4.Text = ""
ComboBox5.Text = ""
txtpuntos.Text = ""
txtsueldo.Text = ""
txtescala.Text = ""
txtnombres.Text = ""
txtcedula.Text = ""
txtdireccion.Text = ""
txttelefono.Text = ""
End Sub
PROGRAMACION I U.T.A 5to “U”
81 FCHE DIEGO CHICAIZA
(CODIFICACION DEL BOTON SALIR)
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub txtnombres_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtnombres.TextChanged
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
82 FCHE DIEGO CHICAIZA
Ingresamos los datos basicos.
Ingresamos los datos academicos culminados.
PROGRAMACION I U.T.A 5to “U”
83 FCHE DIEGO CHICAIZA
El total de puntos alcanzados.
EJERCICIO 17.
Realizar un programa que me permita realizar consultas médicas en la cual haya una
serie de especialidades y la cual contenga el control de citas de cada paciente como total
de turnos, recaudación, y el valor de cada consulta, además el programa debe contener
la opción adicionar y el botón nuevo.
Agregamos 10, Labels para Ingresar Nombres de especificación de datos, para
identificar el tipo de dato o función
Asignamos 11 TextBox, en cambio nos permite ingresar datos al momento de ejecutar
del programa.
Para tener opciones de: adicionar, nuevo y Salir asignamos 3 Button en la cual nos toca
insertar códigos para su respectiva función.
Para ingresar una serie de Especialidades no s situamos en Propiedades y luego en Items
( colection)
Dentro de TextBox especialidades programamos diciendo que si es más de 5 citas no
hay turnos a más de eso añadiendo cada tipo de consultas con su valor y por último la
suma de recaudaciones y el valor total de la consulta por cada tipo de consulta realizada
por el paciente.
PROGRAMACION I U.T.A 5to “U”
84 FCHE DIEGO CHICAIZA
Public Class Form1
Private Sub cmdespecialidad_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdespecialidad.SelectedIndexChanged
Dim a As Byte
Select Case (cmdespecialidad.SelectedIndex)
Case Is = 0
txtvalor.Text = 5.0
a = 1
txt1.Text = Val(txt1.Text) + a
If Val(txt1.Text) = 5 Then
MsgBox("No hay turnos")
txt1.Text = 5
End If
txtre1.Text = Val(txtvalor.Text) + Val(txtre1.Text)
Case Is = 1
txtvalor.Text = 6.0
a = 1
txt2.Text = Val(txt2.Text) + a
If Val(txt2.Text) = 5 Then
MsgBox("No hay turnos")
txt2.Text = 5
End If
txtre2.Text = Val(txtvalor.Text) + Val(txtre2.Text)
Case Is = 2
txtvalor.Text = 4.0
a = 1
txt3.Text = Val(txt3.Text) + a
If Val(txt3.Text) = 5 Then
MsgBox("No hay turnos")
txt3.Text = 5
End If
txtre3.Text = Val(txtvalor.Text) + Val(txtre3.Text)
Case Is = 3
txtvalor.Text = 6.0
a = 1
txt4.Text = Val(txt4.Text) + a
If Val(txt4.Text) = 5 Then
MsgBox("No hay turnos")
txt4.Text = 5
End If
txtre4.Text = Val(txtvalor.Text) + Val(txtre4.Text)
End Select
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
txtvalor.Text = ""
txtnombre.Text = ""
cmdespecialidad.Text = ""
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
txt1.Text = ""
PROGRAMACION I U.T.A 5to “U”
85 FCHE DIEGO CHICAIZA
txt2.Text = ""
txt3.Text = ""
txt4.Text = ""
txtre1.Text = ""
txtre2.Text = ""
txtre3.Text = ""
txtre4.Text = ""
txtnombre.Text = ""
txtvalor.Text = ""
cmdespecialidad.Text = ""
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
IMÁGENES DE LA EJECUCION DEL PROGRAMA
PROGRAMACION I U.T.A 5to “U”
86 FCHE DIEGO CHICAIZA
Ingresamos los datos necesarios.
EJERCICIO 18
Diseñe una Base de Datos en Access que tenga conexión con Visual Basic.
1) Está base debe contener los datos personales
2) Y en Visual los Datos Personales un Reporte del mismo.
Descripción:
1) Creamos una de preferencia en la unidad C
2) Abrimos Access creamos nuestra Base y la guardamos de tipo 2002_2003.
3) Creamos una tabla en este caso con los Datos Personales
4) Guardamos todo.
5) Abrimos Visual Basic
6) Damos el nombre al Formulario.
PROGRAMACION I U.T.A 5to “U”
87 FCHE DIEGO CHICAIZA
7) Luego nos dirigimos al Menú Herramientas ->Opciones-> Proyectos y
Soluciones -> Activamos Mostrar configuraciones de generación avanzada
Aceptar.
8) Después vamos a generar -> Opciones de Configuración en plataforma ->
Nueva y ahí cambiamos de x64 a x86.
9) Una vez realizado el cambio Guardamos primero todo el proyecto direccionado
a la misma carpeta que creamos la Base de Datos.
10) Después guardamos el Formulario con el nombre en este caso de entrada.
Objetos
Utilizaremos dos Form
Form1= Entrada
Form2= Reporte
Utilizaremos unos Label
Label1=Cedula
Label2= Nombre
Label1= Apellido
Label1= Edad
Utlizaremos unos TextBox
TextBox1= Txtcedula
TextBox2=Txtnombre
TextBox3=Txtapellido
TextBox4=Txtedad
Utilizaremos un Button
Button1= Reporte (cmdreporte)
Utilizaremos un DataGridView1
DataGridView1= DatosBindingSource1
Utilizaremos un CrystalReportViewer1
CrystalReportViewer1= Reporte
Public Class Form1
Private Sub DATOSBindingNavigatorSaveItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DATOSBindingNavigatorSaveItem.Click
Me.Validate()
Me.DATOSBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Database1DataSet)
PROGRAMACION I U.T.A 5to “U”
88 FCHE DIEGO CHICAIZA
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: esta línea de código carga datos en la tabla
'Database1DataSet.DATOS' Puede moverla o quitarla según sea necesario.
Me.DATOSTableAdapter.Fill(Me.Database1DataSet.DATOS)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Reporte.Show()
End Sub
End Class
IMAGENES DE LA EJECUCION DEL PROGRAMA.
PROGRAMACION I U.T.A 5to “U”
89 FCHE DIEGO CHICAIZA
Ingresamos los datos personales para la base de datos.
EJERCICIO 19
Diseñe un programa utilizando formato de fichas en lo cual tiene que estar automatizado
el ingreso de datos de los estudiantes del instituto educativo secundario y de la
universidad esto tiene que tener su informe y su reporte.
1.- tenemos que hacer una carpeta en nuestro disco con el nombre de datos y abrir el
programa Microsoft Access ya que en este programa vamos hacer los ingresos de
nuestro programa.
Ingresamos los datos que vamos a poner en nuestra aplicación, y ya grabado esto
también en nuestra carpeta y con el formato de Access 2002-2003 ya que con este
formato nos permitirá elaborar correctamente el proceso de interacción con visual.
Ahora creamos nuestro registro de datos que esta guardado en acess
Utilizaremos un DataGridView1
DataGridView1= DatosBindingSource1
Utilizaremos un CrystalReportViewer1
CrystalReportViewer1= Reporte
Utilizaremos un toolstripmenu
PROGRAMACION I U.T.A 5to “U”
90 FCHE DIEGO CHICAIZA
CODIFICACION DEL PROGRAMA
Public Class MENU_PRINCIPAL
Private Sub ESTUDIANTESToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ESTUDIANTESToolStripMenuItem.Click
Dim MDImenu_principal As New Form1
MDImenu_principal.MdiParent = Me
MDImenu_principal.Show()
End Sub
Private Sub SUPERIORToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SUPERIORToolStripMenuItem.Click
End
End Sub
Private Sub GUIAToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
GUIAToolStripMenuItem.Click
Dim MDImenu_principal As New REPORTE
MDImenu_principal.MdiParent = Me
MDImenu_principal.Show()
End Sub
End Class
IMÁGENES DE LA EJECUCIÓN DEL PROGRAMA
PROGRAMACION I U.T.A 5to “U”
91 FCHE DIEGO CHICAIZA
Nos dirigimos a reportes y estudiantes para ver la ficha.
Nos dirigimos a reporte y guia.
PROGRAMACION I U.T.A 5to “U”
92 FCHE DIEGO CHICAIZA
CONCLUSION.
Es muy importante que la base de datos este bien enganchada a visual studio porque de
otra manera los datos no se guardarían de forma normal.
EJERCICIO 20
El proyecto es diseñar un sistema de manejo de bases de datos, que me permita
automatizar el ingreso de datos como: código, nombre categoría, cantidad, precio
unitario de productos o dispositivos de computadores, para lo que se debe generar el
precio total. Además el sistema a través de un menú debe generar tabla de ingreso de
datos, un reporte , y generación de consultas. cabe destacar que para el ingreso de datos
se debe ingresar a través de clave o contraseña.
Utilizaremos 5 form donde iran ubicados reporte, loginform que es una contraseña
prediseñada que tiene visual studio, consultas, y un menú principal.
Utilizaremos un DataGridView1
DataGridView1= DatosBindingSource1
Utilizaremos un CrystalReportViewer1
CrystalReportViewer1= Reporte
Utilizaremos un toolstripmenu
CODIFICACION DEL PROGRAMA.
(LOGINFORM1)
Public Class LoginForm1
' TODO: inserte el código para realizar autenticación
personalizada usando el nombre de usuario y la contraseña
proporcionada
' (Consulte http://go.microsoft.com/fwlink/?LinkId=35339).
' El objeto principal personalizado se puede adjuntar al objeto
principal del subproceso actual como se indica a continuación:
' My.User.CurrentPrincipal = CustomPrincipal
' donde CustomPrincipal es la implementación de IPrincipal
utilizada para realizar la autenticación.
' Posteriormente, My.User devolverá la información de identidad
encapsulada en el objeto CustomPrincipal
' como el nombre de usuario, nombre para mostrar, etc.
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles OK.Click
If PasswordTextBox.Text = "12345" Then
MsgBox("BIENVENIDOS")
Me.Hide()
Form1.Show()
Else
MsgBox("ERROR EN EL PASSWORD")
UsernameTextBox.Text = ""
PasswordTextBox.Text = ""
PROGRAMACION I U.T.A 5to “U”
93 FCHE DIEGO CHICAIZA
End If
End Sub
Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Cancel.Click
Me.Close()
End Sub
Private Sub PasswordTextBox_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
PasswordTextBox.TextChanged
End Sub
End Class
Public Class Form1
Private Sub ConsultasToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ConsultasToolStripMenuItem.Click
Dim MDIform As New CONSULTAS 'Nombre del formulario a abrir
MDIform.MdiParent = Me
MDIform.Show()
End Sub
Private Sub IngresosToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
IngresosToolStripMenuItem.Click
Dim MDIform As New ENTRADA 'Nombre del formulario abrir
MDIform.MdiParent = Me
MDIform.Show()
End Sub
Private Sub SalirToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
SalirToolStripMenuItem.Click
End
End Sub
Private Sub GuiaToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
GuiaToolStripMenuItem.Click
Dim MDIform As New REPORTE 'Nombre del reporte a abrir
MDIform.MdiParent = Me
MDIform.Show()
End Sub
End Class
PROGRAMACION I U.T.A 5to “U”
94 FCHE DIEGO CHICAIZA
IMÁGENES DE LA EJECUCION DEL PROGRAMA.
Nos dirigimos a datos, entrada y se visualiza los datos ingresados.
PROGRAMACION I U.T.A 5to “U”
95 FCHE DIEGO CHICAIZA
Reporte, Guía