elemento n3
Post on 13-Jun-2015
664 Views
Preview:
DESCRIPTION
TRANSCRIPT
UNIVERSIDAD
TÉCNICA DE AMBATO
FACULTAD DE CIENCIAS HUMANAS Y DE LA
EDUCACIÓN
MODULO:
LENGUAJE DE PROGRAMACION II
CARRERA:
DOCENCIA EN INFORMATICA
CURSO:
QUINTO SEMESTRE “U”
DOCENTE:
ING. WILMA GAVILANES
REALIZADO POR:
MARLENE PALLO
PROGRAMA QUE ME PERMITA REALIZAR UNA CARATULA CON SUS
RESPECTIVOS DATOS PERSONALES Y LOGO DE LA UNIVERSIDAD Y CARRERA
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos la siguiente 2 Image
Image1=logo de la facultad
Image2=logo de la UTA
Utilizaremos los siguientes 6 Label
Label1= UNIVERSIDAD TECNICA DE AMBATO
Label2=FACULTAD DE CIENCIAS HUMANAS Y DE LA EDUCACION
Label3=CARRERA
Label4=MODULO
Label5=DOCENTE
Label6=REALIZADO POR
4.-Codificacion
Por ser un programa muy básico no necesita ninguna codificación
5.- Corrido del programa
Regiones del ecuador
Diseñe un proyecto que visualice un las regiones de nuestro Ecuador
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos los siguientes 7 Form
Form1= Contraseña
Form2= Bienvenidos
Form3=Menu Regiones
Form4=Region Costa
Form5=Region sierra
Form6=Region oriente
Form7=Region Insular
Utilizaremos los siguientes 10 Button
Button1=regiones
Button2=salir
Button3=ingresar
Button4=costa
Button5=sierra
Button6=oriente
Button7=galapagos
Button8=regresar
Button9=regresar
Button10=regresar
Utilizaremos los siguientes 22 images
Para las imágenes que se presentaran en cada form
Utilizaremos los siguientes 20 label
Para descripción del texto de cada uno según lo necesitemos
4.-Codificacion
CODIGO DE LA CONTRASEÑA
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdingresar.Click
If txtcontraseña.Text = ("uta") Then
Form1.Show()
Else
MsgBox("CONTRASEÑA INVALIDA")
txtcontraseña.Focus()
txtcontraseña.SelectionStart = 0
txtcontraseña.Text = ""
End If
End Sub
CODIGO PARA OCULTAR LAS PLANTILLAS FORM
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
'Form2.Hide()
Form3.Show()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button5.Click
Form1.Show()
Me.Hide()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
'Form2.Hide()
Form5.Show()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
'Form2.Hide()
Form7.Show()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button4.Click
'Form2.Hide()
Form9.Show()
End Sub
End Class
5.- Corrido del programa
INGRESO DE 3 NOTAS
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos los siguientes 7 Label
Label1=NOMBRE.
Label2=MODULO.
Label3=DEBERES.
Label4=LECCIONES.
Label5=EXAMENES.
Label6=PROMEDIO.
Label7=EQUIVALENCIA.
Utilizaremos los siguientes 7 Textbox
Textbox1=Textbox1.
Textbox2=Textbox2
Textbox3=txtdeberes
Textbox4=txtlecciones
Textbox5=txtexamen
Textbox6=txtpromedio
Textbox7=txtequiv
Utilizaremos los siguientes 2 BUTTON
Button1=NUEVO
Button2=SALIR
4.-Codificacion
Name: txtdeberes
Private Sub txtdeberes_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles txtdeberes.TextChanged
//VALIDACION DE DATOS
If Val(txtdeberes.Text) > 10 Then
txtdeberes.Text = ""
Else
txtpromedio.Text = Format((Val(txtdeberes.Text) + Val(txtlecciones.Text) +
Val(txtexamen.Text)) / 3, "##.00")
End If
//EQUIVALENCIA DEPENDIENDO DEL PROMEDIO
If Val(txtpromedio.Text) >= 7 Then
txtequiv.Text = "APROBADO"
ElseIf Val(txtpromedio.Text) > 5 & Val(txtpromedio.Text) < 7 Then
txtequiv.Text = "SUSPENSO"
Else
txtequiv.Text = "REPROBADO"
End If
End Sub
Name: txtlecciones
Private Sub txtlecciones_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtlecciones.TextChanged
//VALIDACION DE DATOS
If Val(txtdeberes.Text) > 10 Then
txtdeberes.Text = ""
Else
txtpromedio.Text = Format((Val(txtdeberes.Text) + Val(txtlecciones.Text) +
Val(txtexamen.Text)) / 3, "##.00")
End If
//EQUIVALENCIA DEPENDIENDO DEL PROMEDIO
If Val(txtpromedio.Text) >= 7 Then
txtequiv.Text = "APROBADO"
ElseIf Val(txtpromedio.Text) > 5 & Val(txtpromedio.Text) < 7 Then
txtequiv.Text = "SUSPENSO"
Else
txtequiv.Text = "REPROBADO"
End If
End Sub
Private Sub txtexamen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles
txtexamen.Click
End Sub
Name: txtexamen
Private Sub txtexamen_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles txtexamen.TextChanged
//VALIDACION DE DATOS
If Val(txtdeberes.Text) > 10 Then
txtdeberes.Text = ""
Else
txtpromedio.Text = Format((Val(txtdeberes.Text) + Val(txtlecciones.Text) +
Val(txtexamen.Text)) / 3, "##.00")
End If
//EQUIVALENCIA DEPENDIENDO DEL PROMEDIO
If Val(txtpromedio.Text) >= 7 Then
txtequiv.Text = "APROBADO"
ElseIf Val(txtpromedio.Text) > 5 & Val(txtpromedio.Text) < 7 Then
txtequiv.Text = "SUSPENSO"
Else
txtequiv.Text = "REPROBADO"
End If
End Sub
Name: NUEVO
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
txtdeberes.Text = ""
txtlecciones.Text = ""
txtexamen.Text = ""
txtequiv.Text = ""
txtpromedio.Text = ""
End Sub
Name: SALIR
Private Sub salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
salir.Click
End
End Sub
End Class
5.- Corrido del programa
TABLA DE MULTIPLICAR
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
FORM 1 Name Form1
BUTTON Cantidad 3 Name Command 1 Caption Generar Name Command 2 Caption Regresar Name Command 3 Caption Nuevo LABEL Cantidad 1 Name Label1 FORM 2 Name For2 BUTTON Cantidad 3 Name Command 1 Caption Generar Name Command 2 Caption Regresar Name Command 3 Caption Nuevo LABEL Cantidad 3 Name Label1 Caption Tablas Name Label2 Caption Ingrese el factor Name Label1 Caption Ingrese el Limite LISTBOX Cantidad 1 Name List1 FORM 3 Name Form3 BUTTON Cantidad 5 Name Command 1 Text Fibonacci Name Command 2 Text Factorial Name Command 3
Text Primos Name Command 4 Text Salir Name Command 5 Text Limpiar LABEL Cantidad 1 Name Label1 Text Ingrese el limite LISTBOX Cantidad 3 Name List 1 Name List 2 Name List 3
4.-Codificacion
FORM 1 Public Class Form1
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 Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Me.Hide()
Form3.Show()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
FORM 2 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()
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
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
End Class
FORM 3 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
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
5.- Corrido del programa
GENERAR UNA PROFORMA (VINOS Y LICORES)
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
FORM
Cantidad 1
Nombre Form1 (proforma)
LABEL
Cantidad 11
Nombre Label1
Caption PROFORMA
Nombre Label2
Caption VINOS Y LICORES
Nombre Label3
Caption LICORES
Nombre Label4
Caption CANTIDAD
Nombre Label5
Caption P.UNITARIO
Nombre Label6
Caption SUB.TOTAL
Nombre Label7
Caption FORMAS DE PAGO
Nombre Label8
Caption +15% DE RECARGO
Nombre Label9
Forecolor (A su gusto)
Font (A su gusto)
Caption -20% DE DESCUENTO
Nombre Label10
Forecolor (A su gusto)
Font (A su gusto)
Caption IVA
Nombre Label11
Caption T.A PAGAR
TEXTBOX
Cantidad 5
Name Text1
Text (Vacío) CANTIDAD
Name Text2
Text (Vacío) P.UNITARIO
Name Text3
Text (Vacío) SUB.TOTAL
Name Text4
Text (Vacío) IVA
Name Text5
Text (Vacío) TOTAL A PAGAR
COMBOBOX
Cantidad 1
Name BomboBox
CHECKBOX
Cantidad 2
Nombre CheckBox1
Caption +15% DE RECARGO
Nombre CheckBox2
Caption -20% DE DESCUENTO
PICTUREBOX
Cantidad 1
BUTTON
Cantidad 2
Nombre Command1
Caption NUEVO
Nombre Command2
Caption SALIR
4.-Codificacion
FORM1
Public Class Form1 Dim datos As Integer
Dim datos1 As Double
COMBOBOX
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
datos = ComboBox1.SelectedIndex If datos = 0 Then Txtprecio.Text = Val("180.85") datos1 = Txtprecio.Text PictureBox1.Load("C:\PROFORMA\PROFORMA\w1.jpg") ElseIf datos = 1 Then Txtprecio.Text = Val("99.00") datos1 = Txtprecio.Text PictureBox1.Load("C:\PROFORMA\PROFORMA\v1.jpg") ElseIf datos = 2 Then Txtprecio.Text = Val("130.99") datos1 = Txtprecio.Text PictureBox1.Load("C:\PROFORMA\PROFORMA\ch1.jpg") ElseIf datos = 3 Then Txtprecio.Text = Val("90.99") datos1 = Txtprecio.Text PictureBox1.Load("C:\PROFORMA\PROFORMA\sm1.jpG") End If End Sub
TEXTBOX CANTIDAD
Private Sub Txtcantidad_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtcantidad.TextChanged Txttotal.Text = Format(Val(txtcantidad.Text) * Val(Txtprecio.Text), "##.00")
Txtiva.Text = Format(Val(Txttotal.Text * 0.12), "##.00") Txtpagar.Text = Format(Val(Txttotal.Text) + Val(Txtiva.Text), "##.00") End Sub
CHECKBOX CREDITO
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then CheckBox2.Enabled = False End If If CheckBox1.Checked = False Then CheckBox2.Enabled = True CheckBox2.Enabled = False End If End Sub
BUTTON NUEVO
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
txtcantidad.Clear() Txtprecio.Clear() Txttotal.Clear() End Sub
BUTTON SALIR
Private Sub cmsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmsalir.Click
End End Sub
5.- Corrido del programa
Diseñe una aplicación utilizando los números randomicos
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
1 FORM
Name Form1
4 LABEL
Label1 Título principal (Casino)
Label2 son los subtítulos
Label3 son los subtítulos
Label4 son los subtítulos
2 BUTTON
Button 1 Para el botón Jugar (cmdjugar)
Button 2 Para el botón salir (cmdsalir)
PICTUREBOX
Picturebox1 Utilizaremos para agregar la primera imagen
PictureBox2 Utilizaremos para agregar la segunda imagen
4.-Codificacion
Esta codificación está hecha en el botón jugar
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 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
Esta codificación está hecha en el salir
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub
5.- Corrido del programa
PARTES DEL COMPUTADOR
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Formulario 1
Formulario 2
Componentes
FORM
Cantidad 2
El primer formulario lo utilizaremos para el desarrollo de la de la clave para el ingreso a
desarrollar la proforma.
El segundo formulario lo utilizaremos para desarrollar de la proforma de las partes del
computador.
En el primer formulario utilizaremos
BUTTON
Cantidad 2
Se utiliza dos buttom para:
Button1 = Ingresar
Button2 = Salir
LABEL
Cantidad 2
Se utiliza 2 label para designar el nombre según el requerimiento.
Como tenemos el primer label1 para ubicar el tema del formulario en mi caso acceso a la
proforma
El label2 escrito INGRESE LA CLAVE
TEXTBOX
Cantidad 1
Utilizamos 1 textbox para digitar LA CLAVE
En el segundo formulario utilizaremos
BUTTON
Cantidad 3
Se utiliza tres buttom para:
Button1 = Nuevo proforma
Button2 = Regresar a la página de inicio
Button3 = Salir
LABEL
Cantidad 22
Se utiliza 2 label para designar el nombre según el requerimiento.
Label1 = proforma partes del computador
Label2 = datos del cliente
Label3 = nombre
Label4 = Apellido
Label5 = fecha
Label6 = # de proforma
Label7 = Monitores
Label8 = Impresoras
Label9 =discos duros
Label10 =Procesadores
Label11 =Teclado
Label12 = # de proforma
Label13 =Escoja la forma de pago
Label14 = cantidad
Label15 = P.unitario
Label16 =P. total
Label17 =Sub Total
Label18 = Iva
Label18 = Total a pagar
TEXTBOX
Cantidad 24
Txtiva= iva
Txtsubtotal= subtotal
Txttotal = total que a comprado
Txtpunitario= el precio unitario del monitor
Txtcantidad= ingreso para la cantidad de monitores
Txtptotal= el precio tatal de la contidad de monitores
comprados
Txtpunitario2 = el precio unitario de la impresora
Txtcantidad2 = ingreso para la cantidad de impresoras
Txtptotal2 = el precio tatal de la contidad de inpresoras
comprados
Txtpunitario3 = el precio unitario del disco duro
Txtcantidad3 = ingreso para la cantidad de discos duros
Txtptotal3 = el precio tatal de la contidad de discos duros
comprados
Txtpunitario4 = el precio unitario de el procesador
Txtcantidad4 = ingreso para la cantidad de procesadores
Txtptotal4 = = el precio tatal de la contidad de procesadores
comprados
Txtpunitario5 = el precio unitario de el teclado
Txtcantidad5 = ingreso para la cantidad de teclados
Txtptotal5 = = el precio tatal de la contidad de teclados
comprados
Txtcontado = se imprimera el valor a pagar cuando elija pagar
al contado
Txtcredito = se imprimera el valor a pagar cuando elija pagar
a credito
Txtnombre = ingreso del nombre del cliente
Txtapellido = ingreso del apellido del cliente
Txtfecha = ingreso de la fecha de compra
Txtproforma = ingreso del numero de proforma
CHECKBOX
Cantidad 2
CheckBox1 = Contado
CheckBox2 = Crédito
4.-Codificacion
Public Class Form2
//Declarando variables
Dim DATOS As Integer
Dim DATOS1 As Double
//codificando el botón nuevo
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Form1.Show()
Me.Hide()
End Sub
// Codificando el botón salir
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
End
End Sub
// Codificando el combobox monitores
Private Sub Cmbmoni_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbmoni.SelectedIndexChanged
DATOS = Cmbmoni.SelectedIndex
If (DATOS = 0) Then
Txtpunitario.Text = Val("350.00")
DATOS1 = Txtpunitario.Text
ElseIf (DATOS = 1) Then
Txtpunitario.Text = Val("124.00")
DATOS1 = Txtpunitario.Text
ElseIf (DATOS = 2) Then
Txtpunitario.Text = Val("208.00")
DATOS1 = Txtpunitario.Text
ElseIf (DATOS = 3) Then
Txtpunitario.Text = Val("408.00")
DATOS1 = Txtpunitario.Text
ElseIf (DATOS = 4) Then
Txtpunitario.Text = Val("280.00")
DATOS1 = Txtpunitario.Text
End If
End Sub
// Codificando el combobox impresoras
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox2.SelectedIndexChanged
DATOS = ComboBox2.SelectedIndex
If (DATOS = 0) Then
Txtpunitario2.Text = Val("195.00")
DATOS1 = Txtpunitario2.Text
ElseIf (DATOS = 1) Then
Txtpunitario2.Text = Val("455.00")
DATOS1 = Txtpunitario2.Text
ElseIf (DATOS = 2) Then
Txtpunitario2.Text = Val("70.00")
DATOS1 = Txtpunitario2.Text
ElseIf (DATOS = 3) Then
Txtpunitario2.Text = Val("125.00")
DATOS1 = Txtpunitario2.Text
ElseIf (DATOS = 4) Then
Txtpunitario2.Text = Val("145.00")
DATOS1 = Txtpunitario2.Text
End If
End Sub
// Codificando el combobox disco duros
Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox3.SelectedIndexChanged
DATOS = ComboBox3.SelectedIndex
If (DATOS = 0) Then
Txtpunitario3.Text = Val("110.00")
DATOS1 = Txtpunitario3.Text
ElseIf (DATOS = 1) Then
Txtpunitario3.Text = Val("125.00")
DATOS1 = Txtpunitario3.Text
ElseIf (DATOS = 2) Then
Txtpunitario3.Text = Val("180.00")
DATOS1 = Txtpunitario3.Text
ElseIf (DATOS = 3) Then
Txtpunitario3.Text = Val("240.00")
DATOS1 = Txtpunitario3.Text
ElseIf (DATOS = 4) Then
Txtpunitario3.Text = Val("135.00")
DATOS1 = Txtpunitario3.Text
End If
End Sub
// Codificando el combobox procesadores
Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox4.SelectedIndexChanged
DATOS = ComboBox4.SelectedIndex
If (DATOS = 0) Then
Txtpunitario4.Text = Val("80.00")
DATOS1 = Txtpunitario4.Text
ElseIf (DATOS = 1) Then
Txtpunitario4.Text = Val("120.00")
DATOS1 = Txtpunitario4.Text
ElseIf (DATOS = 2) Then
Txtpunitario4.Text = Val("360.00")
DATOS1 = Txtpunitario4.Text
ElseIf (DATOS = 3) Then
Txtpunitario4.Text = Val("270.00")
DATOS1 = Txtpunitario4.Text
ElseIf (DATOS = 4) Then
Txtpunitario4.Text = Val("130.00")
DATOS1 = Txtpunitario4.Text
End If
End Sub
// Codificando el combobox teclado
Private Sub ComboBox5_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ComboBox5.SelectedIndexChanged
DATOS = ComboBox5.SelectedIndex()
If (DATOS = 0) Then
Txtpunitario5.Text = Val("25.00")
DATOS1 = Txtpunitario5.Text
ElseIf (DATOS = 1) Then
Txtpunitario5.Text = Val("14.00")
DATOS1 = Txtpunitario5.Text
ElseIf (DATOS = 2) Then
Txtpunitario5.Text = Val("12.00")
DATOS1 = Txtpunitario5.Text
ElseIf (DATOS = 3) Then
Txtpunitario5.Text = Val("15.00")
DATOS1 = Txtpunitario5.Text
ElseIf (DATOS = 4) Then
Txtpunitario5.Text = Val("18.00")
DATOS1 = Txtpunitario5.Text
End If
End Sub
// Codificando el Txtcantidad cantidad para sacar el precio de los monitores
Private Sub Txtcantidad_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcantidad.TextChanged
Txtptotal.Text = Format(Val(Txtcantidad.Text) * Val(DATOS1),
"##.00")
Txtsubtotal.Text = Format(Val(Txtptotal.Text) +
Val(Txtptotal2.Text) + Val(Txtptotal3.Text) + Val(Txtptotal4.Text) +
Val(Txtptotal5.Text), "##.00")
Txtiva.Text = Format(Val(Txtsubtotal.Text) * 0.12, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) +
Val(Txtiva.Text), "##.00")
End Sub
// Codificando el boton nuevo donde tenemos que mandar a blanquear todos los
textos
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Txtiva.Clear()
Txtsubtotal.Clear()
Txttotal.Clear()
Txtpunitario.Clear()
Txtcantidad.Clear()
Txtptotal.Clear()
Txtpunitario2.Clear()
Txtcantidad2.Clear()
Txtptotal2.Clear()
Txtpunitario3.Clear()
Txtcantidad3.Clear()
Txtptotal3.Clear()
Txtpunitario4.Clear()
Txtcantidad4.Clear()
Txtptotal4.Clear()
Txtpunitario5.Clear()
Txtcantidad5.Clear()
Txtptotal5.Clear()
Txtcontado.Clear()
Txtcredito.Clear()
Txtnombre.Clear()
Txtapellido.Clear()
Txtfecha.Clear()
Txtproforma.Clear()
End Sub
// Codificando el checkbox1
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
Txtcontado.Text = Format(Val(Txtsubtotal.Text) * 0.15,
"##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) -
Val(Txtcontado.Text), "##.00")
If (CheckBox1.Checked = True) Then
CheckBox2.Enabled = False
ElseIf (CheckBox1.Checked = False) Then
CheckBox2.Enabled = True
CheckBox1.Enabled = False
End If
End Sub
Codificando el checkbox2 Private Sub CheckBox2_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox2.CheckedChanged
Txtcredito.Text = Format(Val(Txtsubtotal.Text) * 0.2, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) +
Val(Txtcredito.Text), "##.00")
End Sub
//Codificando el boton cantidad2 para sacar el precio de las impresoras
Private Sub Txtcantidad2_TextChanged_1(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcantidad2.TextChanged
Txtptotal2.Text = Format(Val(Txtcantidad2.Text) * Val(DATOS1),
"##.00")
Txtsubtotal.Text = Format(Val(Txtptotal.Text) +
Val(Txtptotal2.Text) + Val(Txtptotal3.Text) + Val(Txtptotal4.Text) +
Val(Txtptotal5.Text), "##.00")
Txtiva.Text = Format(Val(Txtsubtotal.Text) * 0.12, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) +
Val(Txtiva.Text), "##.00")
End Sub
Codificando el boton cantidad para sacar el precio de los discos duros
Private Sub Txtcantidad3_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcantidad3.TextChanged
Txtptotal3.Text = Format(Val(Txtcantidad3.Text) * Val(DATOS1),
"##.00")
Txtsubtotal.Text = Format(Val(Txtptotal.Text) +
Val(Txtptotal2.Text) + Val(Txtptotal3.Text) + Val(Txtptotal4.Text) +
Val(Txtptotal5.Text), "##.00")
Txtiva.Text = Format(Val(Txtsubtotal.Text) * 0.12, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) +
Val(Txtiva.Text), "##.00")
End Sub
Codificando el boton cantidad para sacar el precio de los procesadores
Private Sub Txtcantidad4_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Txtcantidad4.TextChanged
Txtptotal4.Text = Format(Val(Txtcantidad4.Text) * Val(DATOS1),
"##.00")
Txtsubtotal.Text = Format(Val(Txtptotal.Text) +
Val(Txtptotal2.Text) + Val(Txtptotal3.Text) + Val(Txtptotal4.Text) +
Val(Txtptotal5.Text), "##.00")
Txtiva.Text = Format(Val(Txtsubtotal.Text) * 0.12, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) +
Val(Txtiva.Text), "##.00")
End Sub
Codificando el boton cantidad para sacar el precio de los teclados
Private Sub Txtcantidad5_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcantidad5.TextChanged
Txtptotal5.Text = Format(Val(Txtcantidad5.Text) * Val(DATOS1),
"##.00")
Txtsubtotal.Text = Format(Val(Txtptotal.Text) +
Val(Txtptotal2.Text) + Val(Txtptotal3.Text) + Val(Txtptotal4.Text) +
Val(Txtptotal5.Text), "##.00")
Txtiva.Text = Format(Val(Txtsubtotal.Text) * 0.12, "##.00")
Txttotal.Text = Format(Val(Txtsubtotal.Text) + Val(Txtiva.Text),
"##.00")
End Sub
5.- Corrido del programa
Sistema solar
Diseñe una aplicación que me permita conocer y obtener información de los planetas
del sistema solar.
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos el siguiente Label
Label1=sistema solar
Utilizaremos el siguiente ComboBox1
ComboBox1=nombres de los planetas
Utilizaremos el siguiente PictureBox1
PictureBox1= imagen del planeta seleccionado
Utilizaremos el siguiente TextBox1
TextBox1= para la descripción del planeta
Utilizaremos el siguiente imagelist
imagelist= enlistar las imágenes
4.-Codificacion
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ComboBox1.Items.Add("VEVUS")
ComboBox1.Items.Add("TIERRA")
ComboBox1.Items.Add("MARTE")
ComboBox1.Items.Add("JUPITER")
ComboBox1.Items.Add("URANO")
ComboBox1.Items.Add("PLUTON")
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 = "Es el segundo planeta del Sistema
Solar en orden de distancia desde el Sol, y el tercero en cuanto a
tamaño, de menor a mayor. Recibe su nombre en honor a Venus, la diosa
romana del amor. Se trata de un planeta de tipo rocoso y terrestre,
llamado con frecuencia el planeta hermano de la Tierra, ya que ambos
son similares en cuanto a tamaño, masa y composición, aunque
totalmente diferentes en cuestiones térmicas y atmosféricas. "
PictureBox1.Load("c:\sistema_solar\venus.JPG")
PictureBox2.Image = ImageList1.Images(0)
Case Is = 1
TextBox1.Text = "Es nuestro planeta y el único
habitado. Está en la ecosfera, un espacio que rodea al Sol y que tiene
las condiciones necesarias para que exista vida.La Tierra es el mayor
de los planetas rocosos. Eso hace que pueda retener una capa de gases,
la atmósfera, que dispersa la luz y absorbe calor. De día evita que la
Tierra se caliente demasiado y, de noche, que se enfríe. "
PictureBox1.Load("c:\sistema_solar\tierra.JPG")
PictureBox2.Image = ImageList1.Images(1)
Case Is = 2
TextBox1.Text = "Es el cuarto planeta del Sistema
Solar. Llamado así por el dios de la guerra de la mitología romana
Marte, recibe a veces el apodo dePlaneta rojo debido a la apariencia
rojiza que le confiere el óxido de hierro que domina su superficie."
PictureBox1.Load("c:\sistema_solar\marte.JPG")
PictureBox2.Image = ImageList1.Images(2)
Case Is = 3
TextBox1.Text = "Es el planeta más grande del Sistema
Solar, tiene más materia que todos los otros planetas juntos y su
volumen es mil veces el de la Tierra.Júpiter tiene un tenue sistema de
anillos, invisible desde la Tierra"
PictureBox1.Load("c:\sistema_solar\jupiter.JPG")
PictureBox2.Image = ImageList1.Images(3)
Case Is = 4
TextBox1.Text = "es el séptimo planeta del Sistema
Solar, el tercero en cuanto a mayor tamaño, y el cuarto más masivo. Se
llama en honor de la divinidad griega del cielo Urano (del griego
antiguo «Οὐρανός») el padre de Cronos (Saturno) y el abuelo de Zeus (Júpiter). "
PictureBox1.Load("c:\sistema_solar\urano.JPG")
PictureBox2.Image = ImageList1.Images(4)
Case Is = 5
TextBox1.Text = "Sobre Plutón no se sabe mucho ya que
fue descubierto recién en 1930. El principio vital del planeta es la
transformación a través de la iluminación y renovación. Tiene que ver
con la actividad subterránea o profunda en el inconsciente del ser
humano."
PictureBox1.Load("c:\sistema_solar\pluton.JPG")
PictureBox2.Image = ImageList1.Images(5)
End Select
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
End
End Sub
End Class
5. - Corrido del programa
Propiedades alimenticias
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
Utilizaremos el siguiente Label
Label1=propiedades alimenticias
Utilizaremos el siguiente PictureBox1
PictureBox1= imagen de la propiedad alimenticia
Utilizaremos el siguiente TextBox1
TextBox1= para la descripción de las propiedades
Utilizaremos el siguiente imagelist
imagelist= enlistar las imágenes
4.-Codificacion
Public Class Form1
Private Sub cmdpropiedades_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdpropiedades.SelectedIndexChanged
Select Case (cmdpropiedades.SelectedIndex)
Case Is = 0
txt1.Text = "Los vegetales y hortalizas nos brindan
una comida de baja densidad calórica, pero rica en vitaminas y
minerales. Cuando se consumen frescas, es conveniente ajustar su
consumo a su temporada, para aprovechar todos sus micronutrientes."
PictureBox1.Image = ImageList1.Images(0)
Case Is = 1
txt1.Text = "El agua, las vitaminas antioxidantes, los
minerales, las enzimas y la fibra que contiene la fruta nos ayuda a
hidratar, depurar y vitalizar nuestro organismo. Tienen un bajo
contenido en calorías y carecen de colesterol."
PictureBox1.Image = ImageList1.Images(1)
Case Is = 2
txt1.Text = "Las cereales fueron la base alimenticia
en el nacimiento de la agricultura, y con ella, en la aparición de
grandes civilizaciones. Sus aportes nutritivos, su gran versatilidad
culinaria (para la elaboración de panes, pasta, y otros alimentos a
partir de la harina de cereal) y porque su bajo contenido en agua
facilita su conservación, han determinado la importancia de los
cereales en la alimentación humana"
PictureBox1.Image = ImageList1.Images(2)
Case Is = 2
txt1.Text = "El marisco es un alimento muy importante
en la nutrición ya que es rico en proteínas, vitaminas y minerales. Y
lo mejor de todo es que apenas tiene aporte calórico y tiene muy poca
grasa, así que es ideal para dietas. Este tipo de alimento es
excelente proveedor de minerales tales como hierro, fósforo, zinc,
potasio y yodo, además de tener importantes cantidades de vitaminas A
y B"
PictureBox1.Image = ImageList1.Images(3)
Case Is = 2
txt1.Text = "Los lácteos agrupan una serie de
alimentos que dentro de su composición química poseen nutrientes que
brindan ciertas propiedades y beneficios a la salud. Fortalece los
huesos gracias a su aporte en calcio, vitamina A y D."
PictureBox1.Image = ImageList1.Images(4)
End Select
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
cmdpropiedades.Items.Add("verduras")
cmdpropiedades.Items.Add("frutas")
cmdpropiedades.Items.Add("cereales")
cmdpropiedades.Items.Add("mariscos")
cmdpropiedades.Items.Add("lacteos")
End Sub
End Class
5.- Corrido del programa
Programa del rol de pagos
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
FORM
CANTIDAD 2
FORM1 PARA EL ROL DE PAGOS
FORM2 PARA INGRESAR LA CLAVE DEL USUARIO
PICTUREBOX
CANTIDAD 1
PICTUREBOX1 = PARA PONER UNA IMAGEN EN EL FORM2 PARA LA CLAVE
LABEL
CANTIDAD 28
CADA LABEL SE UTILIZO PARA PONER DIFERENTES TITULOS Y SUBTITULOS EN LOS DOS
FORMULARIOS
TEXTBOX
CANTIDAD 18
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
T TEXTBOX18=OTAL A RECIBIR
BUTTON
CANTIDAD 6
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
CHEKBOX
CANTIDAD 1
CHEKBOX 1 = PARA SELECCIONAR SI TIENE PRESTAMO O NO
4.-Codificacion
CODIFICADO PARA LA CLAVE
Public Class Form1
Private Sub cmdrol_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdrol.Click
If txtclave.Text = ("marlene") Then
Form2.Show()
Me.Hide()
Else
MsgBox("CONTRASEÑA INVALIDA")
txtclave.Focus()
txtclave.SelectionStart = 0
txtclave.Text = ""
End If
End Sub
CODIFICADO PARA EL ROL DE PAGOS Public Class Form2
Dim datos As Integer
Dim datos1, hora, familia As Double
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Txtnonbre_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtnonbre.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtapellido_KeyPress(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles
Txtapellido.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtci_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtci.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
Else
e.Handled = True
End If
End Sub
Private Sub Txtci_TextChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles Txtci.TextChanged
End Sub
Private Sub Cmbcargo_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbcargo.SelectedIndexChanged
datos = Cmbcargo.SelectedIndex
If datos = 0 Then
Txtsueldo.Text = Format(Val("1000.15"), "##.00")
datos1 = Txtsueldo.Text
ElseIf datos = 1 Then
Txtsueldo.Text = Format(Val("500.15"), "##.00")
datos1 = Txtsueldo.Text
ElseIf datos = 2 Then
Txtsueldo.Text = Format(Val("800.20"), "##.00")
datos1 = Txtsueldo.Text
ElseIf datos = 3 Then
Txtsueldo.Text = Format(Val("665.25"), "##.00")
datos1 = Txtsueldo.Text
ElseIf datos = 4 Then
Txtsueldo.Text = Format(Val("800.85"), "##.00")
datos1 = Txtsueldo.Text
End If
End Sub
Private Sub Txtsueldo_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtsueldo.TextChanged
Txtiess.Text = (Val(Txtsueldo.Text) * 11.5) / 100
Txtingresos.Text = Val(Txtsueldo.Text) + Val(Txtvextras.Text)
+ Val(Txtvfamiliares.Text)
Txtegresos.Text = Val(Txtmultas.Text) + Val(Txtiess.Text) +
Val(Txtprestamos.Text)
Txtcobrar.Text = Val(Txtingresos.Text) - Val(Txtegresos.Text)
End Sub
Private Sub Txthoras_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txthoras.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txthoras_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txthoras.TextChanged
If Val(Txthoras.Text) >= 1 And Val(Txthoras.Text) <= 10 Then
Txtvextras.Text = Val(Txthoras.Text) *
(Val(Txtsueldo.Text) * 0.06)
ElseIf Val(Txthoras.Text) = 0 Then
Txtvextras.Text = 0
Else
Txtvextras.Text = (10 * (Val(Txtsueldo.Text) * 0.06))
End If
Txtingresos.Text = Val(Txtsueldo.Text) + Val(Txtvextras.Text)
+ Val(Txtvfamiliares.Text)
End Sub
Private Sub Txtcargas_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtcargas.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsSeparator(e.KeyChar) Then
Else
e.Handled = True
End If
End Sub
Private Sub Txtcargas_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcargas.TextChanged
If Val(Txtcargas.Text) > 1 And Val(Txtcargas.Text) <= 2 Then
Txtvfamiliares.Text = (Val(Txtcargas.Text) * 15.5)
ElseIf Val(Txtcargas.Text) = 0 Then
Else
Txtvfamiliares.Text = (Val(Txtcargas.Text) * 10.5)
End If
Txtingresos.Text = Val(Txtsueldo.Text) + Val(Txtvextras.Text)
+ Val(Txtvfamiliares.Text)
End Sub
Private Sub Txtfaltas_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtfaltas.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtfaltas_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtfaltas.TextChanged
If Val(Txtfaltas.Text) >= 1 And Val(Txtfaltas.Text) < 7 Then
Txtmultas.Text = (3 * Val(Txtfaltas.Text))
ElseIf Val(Txtfaltas.Text) = 0 Then
Txtmultas.Text = 0
Else
Txtmultas.Text = (Val(Txtsueldo.Text) * 0.2)
End If
Txtegresos.Text = Val(Txtmultas.Text) + Val(Txtiess.Text) +
Val(Txtprestamos.Text)
End Sub
Private Sub CheckBox1_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Txtprestamos.Visible = True
chkMultas.Enabled = False
End If
If CheckBox1.Checked = False Then
Txtprestamos.Visible = False
chkMultas.Enabled = True
chkMultas.Enabled = False
End If
End Sub
Private Sub Txtprestamos_KeyPress(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles
Txtprestamos.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtprestamos_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Txtprestamos.TextChanged
Txtegresos.Text = Val(Txtmultas.Text) + Val(Txtiess.Text) +
Val(Txtprestamos.Text)
Txtcobrar.Text = Val(Txtingresos.Text) - Val(Txtegresos.Text)
End Sub
Private Sub chkMultas_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
chkMultas.CheckedChanged
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click
Txtnonbre.Text = " "
Txtapellido.Text = " "
Txtdireccion.Text = " "
Txtci.Text = " "
Txthoras.Text = " "
Txtcargas.Text = " "
Txtfaltas.Text = " "
Txtsueldo.Text = " "
Txtvextras.Text = " "
Txtvfamiliares.Text = " "
Txtingresos.Text = " "
Txtegresos.Text = " "
Txtiess.Text = " "
Txtmultas.Text = " "
Txtprestamos.Text = " "
Txtcobrar.Text = ""
End Sub
Private Sub Txtdia_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs)
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Label13_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Label13.Click
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button3.Click
End
End Sub
End Class
5.- Corrido del programa
SISTEMA DE MATRICULAS
Elaborar un programa que me permita realizar el ingreso de los datos de un estudiante al
sistema de matriculas, donde se me detalle los colegios y el tipo fiscal o particular, y se me
visualice el valor de la matricula, servicio medico, internet y recreación, y el valor total a
pagar.
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
1splitContainer
15 label
Label1=sistema de recaudacion
Label2=datos personales
Label3=nombre
Label4=apellido
Label5=cedula
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
10 textbox
Textbox1=txtnombre
Textbox2=txtapellido
Textbox3=txtcedula
Textbox4=txtdireccion
Textbox5=txttelefono
Textbox6= txtvmatricula
Textbox7= txtsmedico
Textbox8= txtsinternet
Textbox9= txtsrecreacion
Textbox10= txttotal
2 button
Button1=salir
Button2=nuevo
2 Combobox
Combobox1=cmbcolegio
Combobox1=cmbtipo
4.-Codificacion
Codification del from1
Private Sub cmdimgresar_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdimgresar.Click
If Txtclave.Text = "marlene" Then
Me.Hide()
Form2.Show()
Else
MsgBox("clave incorrecta")
Txtclave.Text = " "
End If
Codification del from1
Public Class Form2
Dim fiscal As Integer
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Cmbtipo.Items.Add("FISCAL")
Cmbtipo.Items.Add("FISCOMISIONAL")
Cmbtipo.Items.Add("PRIVADO")
End Sub
Private Sub SplitContainer1_Panel1_Paint(ByVal sender As
System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles
SplitContainer1.Panel1.Paint
End Sub
Private Sub Cmbtipo_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbtipo.SelectedIndexChanged
Select Case (Cmbtipo.SelectedIndex)
Case Is = 0
Lblfiscal.Visible = True
Cmbcolegio.Visible = True
Lblfisco.Visible = False
Cmbfisco.Visible = False
Lblprivado.Visible = False
Cmbprivado.Visible = False
Case Is = 1
Lblfiscal.Visible = False
Cmbcolegio.Visible = False
Lblfisco.Visible = True
Cmbfisco.Visible = True
Lblprivado.Visible = False
Cmbprivado.Visible = False
Case Is = 2
Lblfiscal.Visible = False
Cmbcolegio.Visible = False
Lblfisco.Visible = False
Cmbfisco.Visible = False
Lblprivado.Visible = True
Cmbprivado.Visible = True
End Select
End Sub
Private Sub Cmbcoelegio_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbcolegio.SelectedIndexChanged
Txtmatricula.Text = 120
Txtmedico.Text = Format(Val(Txtmatricula.Text) * 0.06,
"##.00")
Txtinternet.Text = Format(Val(Txtmatricula.Text) * 0.08,
"##.00")
Txtrecreacion.Text = Format(Val(Txtmatricula.Text) * 0.1,
"##.00")
Txtcarnet.Text = 5
Txttotalpagar.Text = Format(Val(Txtmatricula.Text) +
Val(Txtmedico.Text) + Val(Txtinternet.Text) + Val(Txtrecreacion.Text)
+ Val(Txtcarnet.Text), "##.00")
End Sub
Private Sub Cmbfisco_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbfisco.SelectedIndexChanged
Txtmatricula.Text = 180
Txtmedico.Text = Format(Val(Txtmatricula.Text) * 0.08,
"##.00")
Txtinternet.Text = Format(Val(Txtmatricula.Text) * 0.09,
"##.00")
Txtrecreacion.Text = Format(Val(Txtmatricula.Text) * 0.11,
"##.00")
Txtcarnet.Text = 5
Txttotalpagar.Text = Format(Val(Txtmatricula.Text) +
Val(Txtmedico.Text) + Val(Txtinternet.Text) + Val(Txtrecreacion.Text)
+ Val(Txtcarnet.Text), "##.00")
End Sub
Private Sub Cmbprivado_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Cmbprivado.SelectedIndexChanged
Txtmatricula.Text = 250
Txtmedico.Text = Format(Val(Txtmatricula.Text) * 0.09,
"##.00")
Txtinternet.Text = Format(Val(Txtmatricula.Text) * 0.1,
"##.00")
Txtrecreacion.Text = Format(Val(Txtmatricula.Text) * 0.12,
"##.00")
Txtcarnet.Text = 5
Txttotalpagar.Text = Format(Val(Txtmatricula.Text) +
Val(Txtmedico.Text) + Val(Txtinternet.Text) + Val(Txtrecreacion.Text)
+ Val(Txtcarnet.Text), "##.00")
End Sub
Private Sub Txtnombre_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtnombre.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtnombre_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtnombre.TextChanged
End Sub
Private Sub Txtapellido_KeyPress(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles
Txtapellido.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtapellido_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtapellido.TextChanged
End Sub
Private Sub Txtcedula_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Txtcedula.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txtcedula_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txtcedula.TextChanged
End Sub
Private Sub Txttelefono_KeyPress(ByVal sender As Object, ByVal e
As System.Windows.Forms.KeyPressEventArgs) Handles
Txttelefono.KeyPress
If Char.IsDigit(e.KeyChar) Then
e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Or
Char.IsSeparator(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub
Private Sub Txttelefono_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Txttelefono.TextChanged
End Sub
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 Label16_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Label16.Click
End Sub
End Class
5.- Corrido del programa
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
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)
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
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)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
End
End Sub
5.- Corrido del programa
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.
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
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.
1.- Abrir un nuevo proyecto en visual Basic
2.-Apariencia del formulario
3.-Componentes
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
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 = ""
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.
4.-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
(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)
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
(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
5.- Corrido del programa
PROGRAMA ENTRELAZADO CON ACCES
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 crear 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.
2.-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.
3.- Ya grabado todos nuestros datos en Access nos dirigimos a abrir el programa visual net el cual también lo guardamos en nuestra carpeta ya realizada
4.- Ya abierto el visual net nos dirigimos a la pestaña proyecto y escogemos la opción
formulario de inicio este nos permite ponerle la inicio una clave ya que este ya viene diseñado.
5.- Despues nos saldra este diseño y aca podenos bolverle a diseñar cambiandole de imagen y
el formasdo de sus label y de su formulario.
6.- Nos dirigimos a el botón de aceptar dándole doble clic nos dirigirá a un programador, acá
tenemos que programar para que nos coja la contraseña que nosotros queramos.
7.- ya programado la contraseña nos dirigimos a crear otro formulario ya que en este tiene que
estar el menú principal de nuestro programa, primero tenemos que irnos a nuestras
herramienta y elegir la opción MenuStrip
8.- Acá nos saldrá esta ventanitas, en estas ventanas podremos poner nuestro menú
9.- Acá ya puesto tono nuestro menú tenemos que programarle para que al presionar una
ventana se nos dirija a lo que nos esta pidiendo
10.-Este es su codificado para que se dirija a nuestro ingreso de datos
11.- este es el codificado para que se nos dirija a nuestro informe o detalle
12.- este es el codificado para que se salga de nuestro programa
13.- este es su codificado para que se nos dirija nuestro reporte
14.-Despues de haber creado nuestro menú comenzamos hacer nuestro reporte y empezamos
creando otro formulario acá tenemos que dirigirnos a proyecto y escogemos la opción agregar
nuevo elemento y nos saldrá la siguiente ventana
15.- Acá tenemos darle clic en next
16.- Acá vamos a darle un clic en examinar ya que este nos permite entrelazar nuestro
información que tenemos con Access la buscamos y aceptamos
17.- Acá ya escogido nuestro Access damos clic en nueva conexión y ponemos next y también
nos saldrá una ventana la cual tenemos que dar clic en no y listo.
18.- Acá se nos desplegara una nueva ventana la cual tenemos que elegir las dos opciones y
aceptar
19.- Ya creado nuestro reporte tenemos que dirigirnos a origen de datos y taspasar todo los
datos necesarios para crear nuestro ingreso de datos.
20.- Ya traspasado dodos nuestros datos yos podemos configurar como nosotros queramos
incluso ponerle una imagen según sea el tema de nuestro programa
21.-Ya echo todo eso creamos otro formulario donde en este vamos a crear nuestro
crystareportviwer yo escogemos en nuestra barra de herramientas.
22.-ya escogido se nos desplegara una nueva ventana donde tenemos que escoger nuestro
reporte ya creado anterior mente y listo ya podemos verla
23.-Acá vamos a crea una nueva conexión donde tenemos la oportunidad de agruparlos como
nosotros queramos o filtrarlos según lo pedido del programa, tenemos que dirigirnos al icono
proyecto y escoger la opción agregar nuevo elemento después dirigirnos a reporting y escoger
cristal reporty
24.- Acá escogemos la opción estándar damos clic en aceptar
25.- En esta ventana tenemos que escoger nuestro informe que lo tenemos desarrollado en
Access
26.-Ya elegido nuestra base de datos tenemos que buscarla en esta ficha y pasarla a la otra
ventana.
27.-Aca tenemos que pasar todos los datos a la otra plantilla
28.- Acá pasamos lo datos con los que queramos que se agrupen
28.- escogemos el formato estándar y aceptamos
29.- listo ya tenemos nuestro informe
30.-realizamos otro formulario ponemos el informe
22.- corremos el programa con f5 y podemos ver que nos saldrá la ventana de la clave La
ingresamos y nos dirigirá al menú.
23.-En este menú elegimos ingreso de datos dándole doble clic
24.-ingresamos los datos y guardamos y dándole un clic en detalles podremos ver lo que
hemos guardado.
top related