Sunteți pe pagina 1din 103

PAULINA GUATAPI

UNIVERSIDAD
TCNICA DE AMBATO



FACULTAD DE CIENCIAS HUMANAS Y DE LA
EDUCACIN

MODULO:
LENGUAJE DE PROGRAMACION I
CARRERA:
DOCENCIA EN INFORMATICA
CURSO:
QUINTO SEMESTRE U
DOCENTE:
ING. WILMA GAVILANEZ
REALIZADO POR:
PAULINA GUATAPI

PAULINA GUATAPI

EJERCICIOS
REALICE UN PROGRAMA QUE ME PERMITA REALIZAR UNA CARATULA CON
SUS RESPECTIVOS DATOS PERSONALES Y LOGOS DE LA UNIVERSIDAD Y
CARRERA
ELEMENTOS:
LABELS
NUMERO:8
LABEL1 (UNIVERSIDAD TECNICA DE AMBATO)
LABEL2 (FACULTAD DE CIENCIAS HUMANAS Y DE LA EDUCACION)
LABEL3 (CARRERA DE DOCENCIA EN INFORMATICA)
LABEL4 (NOMBRE)
LABEL5(NOMBRE INGINIERA)
LABEL6 (NOMBRE DE LA MATERIA)
LABEL7( SEMESTRE)
LABEL8 (EL AO)
PICTURES
NUMERO:3
PICTURE1 LOGO DE LA UNIVERSIDAD
PICTURE2LOGO DE LA CARRERA
PASOS

COMO PRIMER PASO ES CREAR UN FORMULARIO CON EL NOMBRE A
NUESTRO GUSTO EN ESTE CASO CON EL NOMBRE DE CARATULA.
PAULINA GUATAPI


Se muestra un formulario ya listo para cear una nueva presentacion.
COMO YA LO HEMOS VISTO ESTE PROGRAMA ES UNO DE LOS MAS FACILES
NO NECESITA NINGUNA CLASE DE CODIGO.

En este formulario presentamos el primer dato insertando un labels con el nombre de
universidad tecnica de ambato.
PAULINA GUATAPI


De igual manera vamos insertando los labels de uno en uno.

Inserto los logos de la universidad y de la carrera

Se muestra esta pantalla para importar la imagen como es el logo.
PAULINA GUATAPI


Se muestra la imagen que se va a inserta

Esta imagen muestra la imagen ya insertada en el formulario.
PAULINA GUATAPI



Luego de terminar insertando imgenes
nos muestra el programa ya ejecutado de esta manera.








PAULINA GUATAPI



ESTE PROGRAMA ES UNO DE LOS MAS SENCILLOS PORQUE NO ES NECESARIO
NINGUNA CODIFICACION.
COMO YA LO HEMOS VISTO ESTE PROGRAMA ES UNO DE LOS
NO NECESITA NINGUNA CLASE DE CODIG

DATOS PERSONALES

1.- ENUNCIADO
Realice un programa que me permita ingresar los datos personales del usuario.

2.- DECRIPCION
Este es un programa que me permitir ingresar los datos personales de una persona n veces y
visualizarlos con un msgbox.

PAULINA GUATAPI

3.- OBJETOS
5labels
label1=Titulo
label2=nombre
label3=apellido
label4=direccion
label5=telefono

2 buton
buton 1= nuevo
buton 2= salir

4.-codigo
Public Class Form1
*******************boton salir********************

Private Sub cmdsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cmdsalir.Click
End

End Sub
*******************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 = ""
PAULINA GUATAPI

txttelefono.Text = ""
End Sub
End Class

5.-PANTALLA

PAULINA GUATAPI



INGRESO DE 3 NOTAS
En el siguiente ejercicio vamos a ingresar el nombre del alumno, nombre del modulo, las nota de
deberes, lecciones y exmenes, el promedio de las tres notas y la equivalencia.
El ingreso de notas van a ser validadas hasta un lmite de 10.
La equivalencia: promedio >=7 APROBADO
promedio >5 y <7 SUSPENSO
promedio <5 REPROBADO
Utilizaremos un solo formulario.
OBJETOS

LABELS
Numero: 7
Label1
Text: NOMBRE.
PAULINA GUATAPI

Label2
Text: MODULO.
Label3
Text: DEBERES.

Label4
Text: LECCIONES.
Label5
Text: EXAMENES.
Label6
Text: PROMEDIO.
Label7
Text: EQUIVALENCIA.
TEXT
Numero:7
Textbox1
Enabled: True
Textbox2
Enabled: True
Textbox3
Name: txtdeberes
Enabled: True
Textbox4
Name: txtlecciones
Textbox5
Name: txtexamen
PAULINA GUATAPI

Enabled: True
Textbox6
Name: txtpromedio
Enabled: False
Textbox7
Name: txtequiv
Enabled: False

BUTTON
Numero:2
Button1
Name: NUEVO
Button2
Name: SALIR
CODIFICADO
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
PAULINA GUATAPI

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
PAULINA GUATAPI

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

PAULINA GUATAPI

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
CAPTURA DE PANTALLAS
PAULINA GUATAPI



TABLA DE MULTIPLICAR


Componentes

FORM 1

Name Form1
Backcolor (A su gusto)
Windowstate Maximize


BUTTON
Cantidad 3

Name Command 1
Backcolor (A su gusto)
Caption Tablas

Name Command 2
Backcolor (A su gusto)
Caption Serie de datos

Name Command 3
Backcolor (A su gusto)
PAULINA GUATAPI

Caption Salir


LABEL
Cantidad 1
Name Label1
Forecolor (A su gusto)
Caption Tablas de Multiplicar


FORM 2

Name For2
Backcolor (A su gusto)
Windowstate Maximize

BUTTON
Cantidad 3

Name Command 1
Backcolor (A su gusto)
Caption Generar

Name Command 2
Backcolor (A su gusto)
Caption Regresar

Name Command 3
Backcolor (A su gusto)
Caption Nuevo

LABEL
Cantidad 3

Name Label1
Forecolor (A su gusto)
Caption Tablas

Name Label2
Forecolor (A su gusto)
Caption Ingrese el
factor

Name Label1
Forecolor (A su gusto)
Caption Ingrese el Limite
PAULINA GUATAPI


LISTBOX
Cantidad 1
Name List1
List (Vaco)


FORM 3

Name Form3
Backcolor (A su gusto)
Windowstate Maximize

BUTTON
Cantidad 5

Name Command 1
Backcolor (A su gusto)
Text Fibonacci

Name Command 2
Backcolor (A su gusto)
Text Factorial


Name Command 3
Backcolor (A su gusto)
Text Primos


Name Command 4
Backcolor (A su gusto)
Text Salir

Name Command 5
Backcolor (A su gusto)
Text Limpiar


LABEL
Cantidad 1

Name Label1
Forecolor (A su gusto)
Text Ingrese el limite

PAULINA GUATAPI


LISTBOX
Cantidad 3

Name List 1
List (Vaco)

Name List 2
List (Vaco)

Name List 3
List (Vaco)

PROGRAMACION


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
PAULINA GUATAPI


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()
PAULINA GUATAPI

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

PAULINA GUATAPI



PAULINA GUATAPI










PAULINA GUATAPI


REGIONES DEL ECUADOR
1.- Disee un proyecto que visualice un las regiones de nuestro Ecuador
ANALISIS
Disearemos nuestro formulario en el cual utilizaremos Objeto como Label, TextBox, Button,
ComboBox, el cual nos permitir disear nuestra aplicacin.
COMPONENTE
Form =11
Form1= Contrasea
Form2= Bienvenidos
Form3=Menu Regiones
Form4=Region Costa
Form6=Region sierra
Form8=Region oriente
Form10=Region Insular

Label=20 =>Descripcin del texto
Button=20=> Evento al hacer clic permite ingresar a la pgina deseada.
Picturebox=26 => imgenes que se presenta en cada form

CODIGO

CODIGO DE LA CONTRASEA

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cmdingresar.Click
If txtcontrasea.Text = ("1234") Then
Form1.Show()
Else
MsgBox("CONTRASEA INVALIDA")
txtcontrasea.Focus()
txtcontrasea.SelectionStart = 0
txtcontrasea.Text = ""
End If
PAULINA GUATAPI

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

CAPTURA DE PANTALLAS
PAULINA GUATAPI



PAULINA GUATAPI



PAULINA GUATAPI




GENERAR UNA PROFORMA (VI NOS Y LI CORES)
1. Abrir un nuevo Proyecto en Visual BasicGG
COMPONENTES
LABEL
Cantidad 11
Nombre Label1
Forecolor (A su gusto)

PAULINA GUATAPI


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
Caption -20% DE DESCUENTO

Nombre Label10
Caption IVA

Nombre Label11
Caption T.A PAGAR

TEXTBOX
Cantidad 5
Name Text1
Text (Vaco) CANTIDAD

Name Text2
Text (Vaco) P.UNITARIO

Name Text3
Text (Vaco) SUB.TOTAL

Name Text4
Text (Vaco) IVA

Name Text5
PAULINA GUATAPI

Text (Vaco) TOTAL A PAGAR

COMBOBOX
Cantidad 1
Name BomboBox
Text (Vaco)

CHECKBOX
Cantidad 2
Nombre CheckBox1
Forecolor (A su gusto)
Font (A su gusto)
Caption +15% DE RECARGO

Nombre CheckBox2
Forecolor (A su gusto)
Font (A su gusto)
Caption -20% DE DESCUENTO

PI CTUREBOX
Cantidad 1

BUTTON
Cantidad 2
Nombre Command1
Caption NUEVO

Nombre Command2
Caption SALIR
PAULINA GUATAPI


CODI FI CACI ON
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 CANTI DAD
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 CREDI TO

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
PAULINA GUATAPI

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 SALI R
Private Sub cmsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cmsalir.Click
End
End Sub
GRABAR Y EJ ECUTAR

Escogemos el tipo de licor y ya nos sale automticamente el valor



DISEE UNA APLICACIN UTILIZANDO LOS NMEROS RANDOMICOS
En este programa veremos cmo manejar nmeros randomicos para lo cual realizaremos un
proyecto llamado casino
PAULINA GUATAPI

En este proyecto utilizamos algunos objetos como:
1 FORM1
Name Form1
4 LABEL
Label1 Ttulo principal (Casino)
Label2 son los subttulos ( 0 )
Label3 son los subttulos ( 0 )
Label4 son los subttulos ( 0 )
2 BUTTON
Button 1 Para el botn Jugar (cmdjugar)
Button 2 Para el botn salir (cmdsalir)
2 PICTUREBOX
Picturebox1 Utilizaremos para agregar la primera imagen
PictureBox2 Utilizaremos para agregar la segunda imagen

Cdigo
Esta codificacin est hecha en el botn 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
PAULINA GUATAPI

MsgBox("Fallaste Intentalo nuevamente")

End If
End Sub
End Class
Esta codificacin 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
Captura de pantalla(Corrido)



PROFORMA
Apariencia del formulario.
Formulario 1
Formulario 2
Componentes
FORM
Cantidad 2
PAULINA GUATAPI

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 segn 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 pgina de inicio
Button3 = Salir
LABEL
Cantidad 22
Se utiliza 2 label para designar el nombre segn el requerimiento.
Label1 = proforma partes del computador
PAULINA GUATAPI

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

PAULINA GUATAPI


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 = Crdito
Codificacin
I nicio del programa
Public Class Form2
//Declarando variables
Dim DATOS As Integer
Dim DATOS1 As Double
//codificando el botn 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 botn 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
PAULINA GUATAPI

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")
PAULINA GUATAPI

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")
PAULINA GUATAPI

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
PAULINA GUATAPI

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

PAULINA GUATAPI




EL SISTEMA SOLAR

Tema:
Disee una aplicacin que me permita conocer y obtener informacin de los planetas del
sistema solar.
PAULINA GUATAPI

Primeramente debemos crear una aplicacin de Windows Forms

El Sistema Solar, vamos a agregarle una primera pantalla de presentacin con distintos botones
o labels que nos vinculan a los otros formularios:
UTILIZAREMOS:
2 LABELS
- utilizaremos cada uno de estos para:
label 1: nuestro sistema solar
label 2: elegir planeta
1 COMBOBOX
- utilizaremos el COMBOBOX para insertar la lista de planetas
1 TEXT BOX
- en el cual colocaremos la informacin relevante a cada planeta
2 PICTURE BOX
- Nos permitir direccionar la imagen de cada planeta segn lo seleccionamos
1 comand button
Insertamos una imagen List.


El cdigo es:

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("TIERRA")
ComboBox1.Items.Add("JUPITER")
ComboBox1.Items.Add("SATURNO")
ComboBox1.Items.Add("URANO")
ComboBox1.Items.Add("NEPTUNO")

PAULINA GUATAPI

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 = "Planeta Mercurio.- Mercurio es el planeta del Sistema
Solar ms prximo al Sol, y el ms pequeo (a excepcin de los planetas enanos).
Forma parte de los denominados planetas interiores o terrestres. Mercurio no tiene
satlites. Se conoca muy poco sobre su superficie hasta que fue enviada la sonda
planetaria Mariner 10, y se hicieron observaciones con radares y radiotelescopios."

PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\MERCURIO.jpg")
PictureBox2.Image = ImageList1.Images(0)
Case Is = 1
TextBox1.Text = "La Tierra es el tercer planeta del Sistema Solar,
considerando su distancia al Sol, y el quinto de ellos segn su tamao. Es el nico
planeta del universo que se conoce en el que exista y se origine la vida. La Tierra se
form al mismo tiempo que el Sol y el resto del Sistema Solar, hace 4.570 millones de
aos.
PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\TIERRA.jpg")
PictureBox2.Image = ImageList1.Images(1)
Case Is = 2
TextBox1.Text = "Planeta Jpiter.- Jpiter es el quinto planeta del Sistema
Solar. Forma parte de los denominados planetas exteriores o gaseosos. Recibe su
nombre del dios romano Jpiter.Se trata del planeta que ofrece un mayor brillo a lo
largo del ao dependiendo de su fase. Es, adems, despus del Sol el mayor cuerpo
celeste del Sistema Solar, con una masa de ms de 310 veces la terrestre, y un dimetro
unas 11 veces ms grande.
PAULINA GUATAPI

PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\JUPITER.jpg")
PictureBox2.Image = ImageList1.Images(2)
Case Is = 3
TextBox1.Text = "Planeta Saturno.- Saturno es el sexto planeta del Sistema
Solar, es el segundo en tamao despus de Jpiter y es 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, tambin llamados
jovianos por su parecido a Jpiter.

PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\SATURNO.jpg")
PictureBox2.Image = ImageList1.Images(3)
Case Is = 4
TextBox1.Text = "Planeta Urano.- Urano es el sptimo planeta del Sistema
Solar. La principal caracterstica de Urano, parece ser la extraa inclinacin de su eje de
rotacin casi noventa grados con respecto a su rbita; la inclinacin no solo se limita al
mismo planeta, sino tambin a sus anillos, satlites y el campo magntico del mismo.
PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\URANO.jpg")
PictureBox2.Image = ImageList1.Images(4)
Case Is = 5
TextBox1.Text = "Planeta Neptuno.- Neptuno es el octavo y ltimo planeta
del Sistema Solar. Forma parte de los denominados planetas exteriores o gaseosos. Su
nombre proviene del dios romano Neptuno, el dios del mar.
PictureBox1.Load("C:\PLANETA\IMAGENESPLANETAS\NEPT.jpg")
PictureBox2.Image = ImageList1.Images(5)
End Select
End Sub
End Class

PAULINA GUATAPI





CONCLUSION:
El programa o este tipo de programas es utilizado para obtener informacin relevante a
temas de inters como el antes visto.

PAULINA GUATAPI


PROPI EDADES ALIMENTICI AS
DI SEAR UN FORMULARI O QUE ME PERMI TA VI SUALI ZAR LAS PROPIEDADES
ALI MENTICI AS UTI LI ZANDO LA HERRAMI ENTA CHECKBOX E IMAGELI ST PARA
VI SUALI ZAR LAS I MGENES Y UNA DESCRI PCI ON DE ELLAS.

Este programa nos permite conocer algunas de las propiedades alimenticias y nos muestra
una imagen que la identifica.

En este caso se ha usado:

3 Label

Label1: Para el Ttulo.
Label2: Para el Subttulo.
Label3: Para la descripcion de cada opcion de la lista.

1 CheckBox

CheckBox: Para desplegar la lista de opcines.

2 PictureBox

PictureBox1: Para visualizar la 1 imagen realizada con el case.
PictureBox2: Para visualizar la 2 imagen realizada con la Herramienta I mageList.

1 Button

Button: Para finalizar el programa.


Public Class PROP_ALIM

Observamos la descripcion de cada propiedad.

Private Sub LISTA_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles LISTA.SelectedIndexChanged
Select Case (LISTA.SelectedIndex)
Case Is = 0
DESCRIP.Text = " Hidratos de carbono: Proporcionan energa tanto para uso
inmediato como para tener de reserva y tambin tienen una funcin estructural.

IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\H_CAR_1.JPG")
IMAG2.Image = ImageList1.Images(0)
Case Is = 1
DESCRIP.Text = " Lpidos Saturados: Ayudan a la reconstruccin y funcionamiento
de nuestro cuerpo y adems forman nuestra reserva de energa y estos son los que se obtienen de
la grasa de origen animal y del aceite vegetal de palma y de coco. Estn relacionados con el
aumento del colesterol.

IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\LIPS_1.JPG")
PAULINA GUATAPI

IMAG2.Image = ImageList1.Images(1)
Case Is = 2
DESCRIP.Text = " Lpidos Insaturados: Ayudan a la reconstruccin y funcionamiento
de nuestro cuerpo y adems forman nuestra reserva de energa y se obtienen de los alimentos de
origen vegetal, a excepcin del aceite de coco y palma.

IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\LIPI_1.JPG")
IMAG2.Image = ImageList1.Images(2)
Case Is = 3
DESCRIP.Text = " Protenas. Son bsicas para los seres vivos. Se necesitan para
formar y reparar los tejidos (msculo, piel, cabello o las uas, etc.) y adems tienen una funcin
metablica y reguladora de nuestro organismo.

IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\PROT_1.JPG")
IMAG2.Image = ImageList1.Images(3)
Case Is = 4
DESCRIP.Text = " Vitaminas Hidrosolubles: Son nutrientes esenciales. Actan como
intermediarias en distintas reacciones qumicas. Pueden trasportarse bien por el agua sin
almacenarse en nuestro organismo (grupo B y vitamina C) "

IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\VIT_H_1.JPG")

IMAG2.Image = ImageList1.Images(4)
Case Is = 5
DESCRIP.Text = " Vitaminas Liposolubles: Son nutrientes esenciales. Actan como
intermediarias en distintas reacciones qumicas. o por la grasa (liposolubles) almacenndose en
el tejido adiposo (A, D, E y K). Estn presentes en mltiples alimentos (frutas, leche, huevos,
carnes, etc.). "
IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\VIT_L_1.JPG")
IMAG2.Image = ImageList1.Images(5)
Case Is = 6
DESCRIP.Text = " Minerales. Participan en la formacin y funcionamiento de
nuestro organismo. Destacan por su importancia el : calcio, fsforo, hierro, yodo, flor, sodio,
cloro, potasio, azufre, magnesio, manganeso, cobre, cobalto y zinc, cromo, molibdeno y selenio.
Se encuentran presentes en casi todos los alimentos en mayor o menor cantidad. "
IMAG1.Load("J:\UTA\5 SEMESTRE\LENGUAJE DE PROGRAMACIN
I\PROPIEDADES_ALIMENTICIAS\MIN_1.JPG")
IMAG2.Image = ImageList1.Images(6)
End Select
End Sub

Aqui he enlistado los nombres de las propiedades alimenticias a mostrarse.

Private Sub PROP_ALIM_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
LISTA.Items.Add("HIDRATOS DE CARBONO")
LISTA.Items.Add("LIPIDOS SATURADOS")
LISTA.Items.Add("LIPIDOS INSATURADOS")
LISTA.Items.Add("PROTEINAS")
LISTA.Items.Add("VITAMINAS HIDROSOLUBES")
LISTA.Items.Add("VITAMINAS LIPOSOLUBLES")
PAULINA GUATAPI

LISTA.Items.Add("MINERALES")
End Sub
Aqui programamos el boton salir.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
End
End Sub

End Class

Esta es la pantalla que nos aparecer al momento de mandar a correr el programa.


PLANILLA DE LUZ

Disee un proyecto que permita calcular la planilla de Luz elctrica segn los siguientes
condicionamientos.
Valide el ingreso de los datos en las cajas de texto de tal manera que solo permita el
ingreso de nmeros
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 automticamente el Total a
Pagar
Proponga su propio diseo
La aplicacin se genera n veces segn lo decida el usuario
Programe todos los botones que considere necesarios

DESCRIPCIN
Este programa nos permite calcular el valor de consumo de luz elctrica segn los watts
consumidos y los recargos por alumbrado pblico, bomberos, y basura.


14 Label

Label 1 = EMPRESA ELECTRICA
PAULINA GUATAPI

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
Public Class Form1

Para validar los datos, ingresar solo letras para el cliente.

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

Para validar el ingreso de datos, que la lectura siempre sea mayor a la anterior.

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()
End If
PAULINA GUATAPI


Para calcular el costo de consumo y calcular el total a pagar adicionando los recargos .

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

Para validar los datos, ingresar solo nmeros para la lectura actual.

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

Para validar los datos, ingresar solo nmeros para la lectura anterior.

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

Para validar los datos, ingresar solo nmeros para el # de cuenta.

Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.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

Para validar los datos, ingresar solo nmeros para la factura.

Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress
If Char.IsDigit(e.KeyChar) Then
PAULINA GUATAPI

e.Handled = False
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = True
End If
End Sub


ROL DE PAGOS
DESCRIPCION
CON ESTE PROYECTO LOGRAREMOS OBTENER LA AUTOMATIZACION DE PAGO
PARA CADA EMPLEADO
APARIENCIA DEL FORMULARIO

OBJETOS UTILIZADOS PARA EL PROYECTO
PARA EL FORMULARIO PRINCIPAL DONDE INGRESAREMOS LA CLAVE TENEMOS
LOS SIGUIENTES OBJETOS:
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 OCNTRASEA DEL USUARIO
PAULINA GUATAPI

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
CODIFICADO
CODIFICADO PARA LA CLAVE
If txtclave.Text = ("PAGOS") Then
Form1.Show()
Me.Hide()
PAULINA GUATAPI

Else
MsgBox("CONTRASEA INVALIDA")
txtclave.Focus()
txtclave.SelectionStart = 0
txtclave.Text = ""
End If
CODIFICADO PARA EL ROL DE PAGOS
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")

DATOS1 = txtsueldo.Text
ElseIf (DATOS = 1) Then

txtcedula.Text = "1804785961"
txtcargo.Text = "SECRETARIA"
txtsueldo.Text = Val("320.50")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 2) Then
txtcedula.Text = "1307845219"
txtcargo.Text = "MENSAJERO"
txtsueldo.Text = Val("100")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 3) Then
txtcedula.Text = Val("1054785445")
txtcargo.Text = "ADMINISTRADOR"
txtsueldo.Text = Val("220")
DATOS1 = txtsueldo.TexT
ElseIf (DATOS = 4) Then
txtcedula.Text = Val("1084512589")
txtcargo.Text = "CONTADOR"
txtsueldo.Text = Val("350.50")
DATOS1 = txtsueldo.Text
ElseIf (DATOS = 5) Then
txtcedula.Text = Val("1087451045")
txtcargo.Text = "VENDEDOR"
txtsueldo.Text = Val("150")
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
PAULINA GUATAPI

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")
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
PAULINA GUATAPI

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



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 = ""
PAULINA GUATAPI

txttele.Text = ""
txtingres.Text = ""
txtegresos.Text = ""
txtiees.Text = ""
txtmonto.Text = ""
txtprestamos.Text = ""
txtmultas.Text = ""
txttomultas.Text = ""
txtcargo.Text = ""
txttofami.Text = ""
txtsueldo.Text = ""
txtcargo.Text = ""
txtfami.Text = ""
txtextras.Text = ""
txttorecibe.Text = ""
txtsueldo.Text = ""
txthextras.Text = ""
txtvalpresta.Text = ""
txttorecibe.Text = ""
End Sub
End Class













PAULINA GUATAPI



MATRICULA
1.-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 recreacin, y el valor total a pagar.
Descripcin del ejercicio
En este ejercicio para el sistema de matrcula se desea ingresar los datos del estudiante y poder
seleccionar un colegio y el tipo ya sea fiscal, particular o fiscomisional.
Tambin se bloquea los textbox donde se nos visualiza los valores de los seguros y el total.
Objetos
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
PAULINA GUATAPI

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
Codificado
Public Class Form1
Dim dato As Integer

Private Sub NOMBRE_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtNOMBRE.KeyPress
If Char.IsNumber(e.KeyChar) Then
e.Handled = True
MsgBox("NO DATOS NUMERICOS")
txtNOMBRE.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
e.Handled = False
Else
e.Handled = False
End If
End Sub

Private Sub APELLIDO_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtAPELLIDO.KeyPress

If Char.IsNumber(e.KeyChar) Then
e.Handled = True
MsgBox("NO DATOS NUMERICOS")
txtAPELLIDO.Focus()
ElseIf Char.IsControl(e.KeyChar) Then
PAULINA GUATAPI

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 txtCEDULA.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
MsgBox("SOLO DATOS NUMERICOS")
txtCEDULA.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 txtTELEFONO.KeyPress
If Char.IsLetter(e.KeyChar) Then
e.Handled = False
MsgBox("SOLO DATOS NUMERICOS")
txtTELEFONO.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 txtVMATRICULA.TextChanged

End Sub

Private Sub TIPO_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmbTIPO.SelectedIndexChanged
dato = cmbTIPO.SelectedIndex
If dato = 0 Then
txtVMATRICULA.Text = "250"

txtSMEDICO.Text = Format(Val(txtVMATRICULA.Text * 0.09), "##, 00")
txtSINTERNET.Text = Format(Val(txtVMATRICULA.Text * 0.1), "##,00")
txtSRECREACION.Text = Format(Val(txtVMATRICULA.Text * 0.12), "##,00")
txtTOTAL.Text = Format(Val(txtVMATRICULA.Text) + Val(txtSMEDICO.Text) +
Val(txtSINTERNET.Text) + Val(txtSRECREACION.Text) + 5, "##,00")
ElseIf dato = 1 Then

txtVMATRICULA.Text = "120"
txtSMEDICO.Text = Format(Val(txtVMATRICULA.Text * 0.06), "##, 00")
txtSINTERNET.Text = Format(Val(txtVMATRICULA.Text * 0.08), "##,00")
txtSRECREACION.Text = Format(Val(txtVMATRICULA.Text * 0.1), "##,00")
PAULINA GUATAPI

txtTOTAL.Text = Format(Val(txtVMATRICULA.Text) + Val(txtSMEDICO.Text) +
Val(txtSINTERNET.Text) + Val(txtSRECREACION.Text) + 5, "##,00")

ElseIf dato = 2 Then

txtVMATRICULA.Text = "180"
txtSMEDICO.Text = Format(Val(txtVMATRICULA.Text * 0.08), "##, 00")
txtSINTERNET.Text = Format(Val(txtVMATRICULA.Text * 0.09), "##,00")
txtSRECREACION.Text = Format(Val(txtVMATRICULA.Text * 0.11), "##,00")
txtTOTAL.Text = Format(Val(txtVMATRICULA.Text) + Val(txtSMEDICO.Text) +
Val(txtSINTERNET.Text) + Val(txtSRECREACION.Text) + 5, "##,00")
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
cmbTIPO.Items.Add("PARTICULAR")
cmbTIPO.Items.Add("FISCAL")
cmbTIPO.Items.Add("FISCOMISIONAL")
cmbCOLEGIO.Items.Add("HISPANO AMRICA")
cmbCOLEGIO.Items.Add("GUAYAQUIL")
cmbCOLEGIO.Items.Add("BOLIVAR")
cmbCOLEGIO.Items.Add("LA SALLE")
cmbCOLEGIO.Items.Add("TIRSO DE MOLINA")
cmbCOLEGIO.Items.Add("ADVENTISTA")
cmbCOLEGIO.Items.Add("ATENAS")
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
txtNOMBRE.Text = ""
txtAPELLIDO.Text = ""
txtTELEFONO.Text = ""
txtDIRECCIN.Text = ""
txtVMATRICULA.Text = ""
cmbTIPO.Text = ""
cmbCOLEGIO.Text = ""
txtSINTERNET.Text = ""
txtSMEDICO.Text = ""
txtSRECREACION.Text = ""
txtTOTAL.Text = ""
End Sub
End Class
Captura de pantalla
PAULINA GUATAPI



Pantalla tipo colegio fiscal


PAULINA GUATAPI



Pantalla tipo colegio particular




PAULINA GUATAPI


CONTROL DE NOTAS

Realizar un programa que permita realizar el control de notas de los estudiantes

If Val(Txtmnota1.Text) >= 1 And Val(Txtmnota1.Text) <= 10 Then
Else
MsgBox("VALOR INCORRECTO")
Txtmnota1.Text = " "


End If
Para sacar el promedio de todas las notas prosedemos a realisar el siguente proseso
If Val(Txtmnota3.Text) >= 1 And Val(Txtmnota3.Text) <= 10 Then
Else
MsgBox("VALOR INCORRECTO")
Txtmnota3.Text = " "
End If
txtpro1.Text = Format((Val(Txtmnota1.Text) + Val(txtmnota2.Text) +
Val(Txtmnota3.Text)) / 3, "##.00")

If Val(txtpro1.Text) >= 7 Then
txtequi1.Text = "APROBADO"
ElseIf Val(txtpro1.Text) >= 5 And Val(txtpro1.Text) <= 7 Then
txtequi1.Text = "SUSPENSO"
ElseIf Val(txtpro1.Text) < 5 Then
txtequi1.Text = "REPROBADO"


End If
Para programar tememos que cambiar en textbox el Name como txtequi1

If Val(Txtmnota3.Text) >= 1 And Val(Txtmnota3.Text) <= 10 Then
Else
MsgBox("VALOR INCORRECTO")
Txtmnota3.Text = " "
End If
txtpro1.Text = Format((Val(Txtmnota1.Text) + Val(txtmnota2.Text) +
Val(Txtmnota3.Text)) / 3, "##.00")

If Val(txtpro1.Text) >= 7 Then
txtequi1.Text = "APROBADO"
ElseIf Val(txtpro1.Text) >= 5 And Val(txtpro1.Text) <= 7 Then
txtequi1.Text = "SUSPENSO"
ElseIf Val(txtpro1.Text) < 5 Then
PAULINA GUATAPI

txtequi1.Text = "REPROBADO"


End If
Select Case (ComboBox1.SelectedIndex)
Case Is = 0
lblmateria1.Text = " FISICA II"
lblmateria2.Text = " TUTORIAS"
lblmateria3.Text = " PROGRAMACIONI"
lblmateria4.Text = " TRABALO EN EQUIPO"
lblmateria5.Text = " MATEMATICA BASICA"
lblmateria6.Text = " METODOLOGIA DE LA INVESTIGACION"
Case Is = 1
lblmateria1.Text = " MODELOS PEDAGOGICOS"
lblmateria2.Text = " MATEMATICA AVANZADA"
lblmateria3.Text = " PSICOLOGIA GENERAL"
lblmateria4.Text = " ELECTRONICA"
lblmateria5.Text = " PROGRAMACION II"
lblmateria6.Text = " ARQUITECTURA MANTENIMIENTO I"
Case Is = 2
lblmateria1.Text = " LENGUAJE PROGRAMACION I"
lblmateria2.Text = " HERRAMIENTAS MULTIMEDIA"
lblmateria3.Text = " PROBLEMAS DE APRENDIZAJE"
lblmateria4.Text = " PLANIFICACION CURRICULAR"
lblmateria5.Text = " GESTOR BASE DE DATOS"
lblmateria6.Text = " ARQUITECTURA MANTENIMIENTO II"
Case Is = 3
lblmateria1.Text = " PRACTICAS PREPROFESIONALES"
lblmateria2.Text = " SISTEMAS OPERATIVOS"
lblmateria3.Text = " PROGRAMACION WEB 1 "
lblmateria4.Text = " REDES"
lblmateria5.Text = " SISTEMATIZACION CONTABLE"
lblmateria6.Text = " GESTION DE PROYECTOS"

End Select



Por ultimo comenzaremos a programar en Button1

txtproge.Text = Format((Val(txtpro1.Text) + Val(txtpro1.Text) + Val(txtpro1.Text) +
Val(txtpro4.Text) + Val(txtpro5.Text) + Val(txtpro6.Text)) / 6, "##.00")
If Val(txtproge.Text) >= 7 Then
txtequito.Text = "APROBADO"
ElseIf Val(txtproge.Text) >= 5 And Val(txtproge.Text) <= 7 Then
txtequito.Text = "SUSPENSO"
ElseIf Val(txtproge.Text) < 5 Then
txtequito.Text = "REPROBADO"
End If
PAULINA GUATAPI

End Sub
Si el estudiante reprueba ms de 3 materias pierde el semestre



*CORRECTO * INCORRECTO








PAULINA GUATAPI




PRUEBA
Automatizar la venta e vehiculos
Ingrese los datos personales el cliente y datos del vehculo como color, marca, costo.
Utilizaremos la siguiente PictureBox
PictureBox1=imagen del auto
Utilizaremos 3 GroupBox
GroupBox1=Datos personales
GroupBox2=Datos del vehculo
GroupBox3=Valores totales


Utilizaremos 19 label.
Label1= Tema
Label2=Cdigo
Label3= Nombre
Label4= Apellido
Label5=Cedula
Label6=Direccin
Label7=Telfono
Label8=Tipo de vehculo
Label9=Valor
Label10=Color
Label11=Aire acondicionado
Label12= Vidrios elctricos
Label13= Valor de venta
Label14=Comisin vendedor
Label15= Total comisin
Label16=Total a pagar
Utilizaremos los siguientes text box
Textbox1=txtnombres
Textbox2=txtapellido
Textbox3=txtcedula
Textbox4=txtdireccion
Textbox4=txttelefono
PAULINA GUATAPI

Textbox5=txttvehiculo
Textbox6=txtvalor
Textbox7=txtvalventa
Textbox8=txtcomvendedor
Textbox9=txttotcomision
Textbox10=txttotpagar
Utilizaremos los 5 combobox.
Combobox1= Para La Seleccin Del Cdigo
Combobox2= Para La Seleccin Del Tipo De Vehculo
Combobox3= Para Seleccionar El Color Del Carro
Combobox4= Para La Seleccin Del Aire Acondicionado
Combobox5= Para La Seleccin De Vidrios Elctricos
Utilizaremos 3 botones
Button1= Para Nuevo
Button2= Para Aadir 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
PAULINA GUATAPI


(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

PAULINA GUATAPI

(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 cmdaadir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles cmdaadir.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
PAULINA GUATAPI


EXAMEN DEL PRIMER PARCIAL
Objetivo: Determinar el nivel de asimilacin sobre los elementos tratados, utilizando un
lenguaje de programacin Visual.
Instructivo:
Aplique el razonamiento lgico para resolver la situacin problmica planteada
Utilice correctamente las sentencias de programacin
Estructure el programa en forma correcta para obtener los resultados requeridos
La evaluacin tiene 2 partes, una terica y otra prctica
La parte terica se lo realizar en el Aula Virtual y tendr una valoracin de 1 punto
La parte prctica tendr una valoracin de 9 puntos

Equivalencia
El desarrollo del programa equivale a 9 puntos
4 puntos el correcto funcionamiento del programa
1 punto el diseo adecuado
2 puntos el proceso de validacin de informacin
2 puntos la acumulacin de informacin y la presentacin correcta de resultados

FECHA: 13/11/2012
NOMBRE:
1.- Se necesita automatizar el proceso de escalafn de los docentes de la Carrera de Docencia en
Informtica de la Facultad de Ciencias Humanas y de la Educacin de la Universidad Tcnica
Ambato, bajo los siguientes parmetros.
1.- Se trabaja en un formato de Fichas
2.- La Ficha Datos Personales permite el ingreso de informacin personal del docente
Cedula
Nombres
Direccin
Telfono

3.- La Ficha Estudios Realizados permite el ingreso de los siguientes Datos
Ttulo Obtenido Magister 200
PAULINA GUATAPI

PHD 300
Tercer Nivel 100
Mritos Mejor Egresado 100
Reconocimientos 50
Publicaciones Libros 100
Revistas 50
Artculos Indexados 50
Idiomas Hablar, Leer, Escribir 50
Leer, Entender 30
Proyectos Investigacin 30
Vinculacin 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=direccin
Label4= cedula
Label5=telfono
Label6=detalle
Label7=tipo
Label8=valor parcial
Label9=valor total
Label10=ttulo obtenido
Label11= mritos
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= nmero de docentes
Label24= sueldo total
PAULINA GUATAPI


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 ttulos obtenidos
Combobox2= para el ingreso de los mritos 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 botn para limpiar los textbox y combobox
txttitulo.Text = ""
txtvmeri.Text = ""
txtvpubli.Text = ""
txtvidio.Text = ""
txtproyec.Text = ""
txttitotal.Text = ""
txtmertotal.Text = ""
PAULINA GUATAPI

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 botn 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


(CODIFICACION DEL TERCER COMBOBOX)

PAULINA GUATAPI

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)
PAULINA GUATAPI

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)

PAULINA GUATAPI

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


PAULINA GUATAPI







CONSULTA MDICA
ENUNCIADO
Realizar un programa que me permita realizar consultas mdicas en la cual haya una serie de
especialidades y la cual contenga el control de citas de cada paciente como total de turnos,
recaudacin, y el valor de cada consulta, adems el programa debe contener la opcin adicionar
y el botn nuevo.
DESCRIPCIN DEL PROGRAMA
El programa nos permitir facilitar el control de citas mdicas para contar cuantas veces se ha
acudido a esa especialidad, cuanta recaudacin a donado y el valor de la consulta para el
paciente.
OBJETOS

Al procesar el ingreso de textos y la rehubicacin de Label y TextBox, tenemos un formulario
asi.
PAULINA GUATAPI


Para tener opciones de: adicionar, nuevo y Salir asignamos 3 Button en la cual nos toca
insertar cdigos para su respectiva funcin.

CODIFICADO

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 ms de 5 citas no hay turnos
a ms de eso aadiendo 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.
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
PAULINA GUATAPI

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
En el Button adicionar ingresamos cdigos, las cuales nos permiten blanquear textos.
txtvalor.Text = ""
txtnombre.Text = ""
cmdespecialidad.Text = ""
En el Button nuevo Ingresamos cdigos, las cuales nos permiten borrar los datos que contienen
los TextBox
txt1.Text = ""
txt2.Text = ""
txt3.Text = ""
txt4.Text = ""
txtre1.Text = ""
txtre2.Text = ""
txtre3.Text = ""
txtre4.Text = ""
txtnombre.Text = ""
txtvalor.Text = ""
cmdespecialidad.Text = ""
En el Button salir Ingresamos cdigo o texto, la cul me permite salir o abandonar el programa.
End
IMAGEN DEL CODIFICADO
PAULINA GUATAPI











DISEE UNA BASE DE DATOS EN ACCESS QUE TENGA CONEXIN CON VISUAL
BASIC.
1) Est base debe contener los datos personales
2) Y en Visual los Datos Personales un Reporte del mismo.
Descripcin:
1) Creamos una carpeta 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.
PAULINA GUATAPI

7) Luego nos dirigimos al Men Herramientas ->Opciones-> Proyectos y Soluciones ->
Activamos Mostrar configuraciones de generacin avanzada Aceptar.
8) Despus vamos a generar -> Opciones de Configuracin 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) Despus guardamos el Formulario con el nombre en este caso de entrada.
Objetos
2 Form
Form1 Entrada
Form2 Reporte

4 Label
Label1=Cedula
Label2= Nombre
Label1= Apellido
Label1= Edad
4 TextBox
TextBox1= Txtcedula
TextBox2=Txtnombre
TextBox3=Txtapellido
TextBox4=Txtedad
1 Button
Button1= Reporte (cmdreporte)
1 DataGridView1
DataGridView1= DatosBindingSource1
1 CrystalReportViewer1
CrystalReportViewer1= Reporte

CODIGO
Public Class Form1
PAULINA GUATAPI


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)

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'TODO: esta lnea de cdigo carga datos en la tabla 'Database1DataSet.DATOS' Puede
moverla o quitarla segn sea necesario.
Me.DATOSTableAdapter.Fill(Me.Database1DataSet.DATOS)

End Sub

En el Button Reporte la codificacin es:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Reporte.Show()
End Sub
End Class
Captura de pantallas


FICHA DE UN ESTUDIANTE
Disee 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.
PAULINA GUATAPI


2.-Aca ingresamos los datos que vamos a poner en nuestra aplicacin, y ya grabado esto
tambin en nuestra carpeta y con el formato de Access 2002-2003 ya que con este formato nos
permitir elaborar correctamente el proceso de interaccin con visual.



3.- Ya grabado todos nuestros datos en Access nos dirigimos a abrir el programa visual net el
cual tambin lo guardamos en nuestra carpeta ya realizada
PAULINA GUATAPI


4.- Ya abierto el visual net nos dirigimos a la pestaa proyecto y escogemos la opcin
formulario de inicio este nos permite ponerle la inicio una clave ya que este ya viene diseado.

5.- Despues nos saldra este diseo y aca podenos bolverle a disear cambiandole de imagen y el
formasdo de sus label y de su formulario.

6.- Nos dirigimos a el botn de aceptar dndole doble clic nos dirigir a un programador, ac
tenemos que programar para que nos coja la contrasea que nosotros queramos.
PAULINA GUATAPI


7.- ya programado la contrasea 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 opcin 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
PAULINA GUATAPI



10.-Este es su codificado para que se dirija a nuestro ingreso de datos


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 opcin agregar
nuevo elemento y nos saldr la siguiente ventana

15.- Ac tenemos darle clic en next
PAULINA GUATAPI

16.- Ac vamos a darle un clic en examinar ya que este nos permite entrelazar nuestro
informacin que tenemos con Access la buscamos y aceptamos


17.- Ac ya escogido nuestro Access damos clic en nueva conexin y ponemos next y tambin
nos saldr una ventana la cual tenemos que dar clic en no y listo.
PAULINA GUATAPI



18.- Ac se nos desplegara una nueva ventana la cual tenemos que elegir las dos opciones y
aceptar

PAULINA GUATAPI

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 segn 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.

PAULINA GUATAPI

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 conexin donde tenemos la oportunidad de agruparlos como
nosotros queramos o filtrarlos segn lo pedido del programa, tenemos que dirigirnos al icono
proyecto y escoger la opcin agregar nuevo elemento despus dirigirnos a reporting y escoger
cristal reporty

24.- Ac escogemos la opcin estndar damos clic en aceptar
PAULINA GUATAPI



25.- En esta ventana tenemos que escoger nuestro informe que lo tenemos desarrollado en
Access


PAULINA GUATAPI

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
PAULINA GUATAPI



28.- escogemos el formato estndar y aceptamos
PAULINA GUATAPI





29.- listo ya tenemos nuestro informe

30.-realizamos otro formulario ponemos para el informe
PAULINA GUATAPI



PAULINA GUATAPI









PAULINA GUATAPI


BASE DE DATOS PARA VENTAS
ENUNCIADO DEL PROBLEMA
El proyecto es disear un sistema de manejo de bases de datos, que me permita automatizar
el ingreso de datos como: cdigo, nombre categora, cantidad, precio unitario de productos
o dispositivos de computadores, para lo que se debe generar el precio total. Adems el
sistema a travs de un men debe generar tabla de ingreso de datos, un reporte , y
generacin de consultas. cabe destacar que para el ingreso de datos se debe ingresar a travs
de clave o contrasea.

DESCRIPCION DEL PROGRAMA
En primer lugar creamos una nueva carpeta en nuestro disco C con nombre PRODUCTOS,
dentro de ella guardamos el proyecto realizado en Acces y guardado en formato 2002-2003.
Dentro de ste, creamos una tabla llamada DATOS con los siguientes campo:
Cdigo
Nombre
Categora
Cantidad
Precio Unitario
Precio total
Los campos cdigo, nombre y categora son tipo texto, en cambio cantidad, p. Unitario y P. total
son te tipo numricos.
Hecho esto cerramos el programa y abrimos Visual, y creamos un nuevo proyecto,
direccionamos ala carpeta que creamos en el disco C llamada PRODUCTOS, y empezamos el
diseo.
Diseamos el form de entrada que nos pide clave y usuario
Luego el men principal
Un form para visualizar reporte
Y finalmente el form para realizar consulta
Este programa nos permite ingresar datos de accesorios de computadoras con su valor unitario y
en la tabla de acces que se visualiza en visual nos muestra todos estos datos inclusive el valor
total.
A parte de esto tambin tenemos acceso a un reporte y a un formulario de consulta.


OBJETOS UTILIZADOS
LOGINFORM1

PAULINA GUATAPI

OBJETO CAN
T.
Names
Textbox 2 UsernameLabel PasswordLabe
l
Label 2 UsernameText
Box
PasswordText
Box
Buttoms 2 ok Cancel
Picturebo
x
1 LogoPictureBo
x




FORM PARA MENU PRINCIPAL

OBJETO CAN
T.
Names
Form 1 PRINCIPAL
ToolStripMenuIte
m
4 ToolStripMenuItem1
CONSULTASToolStripMenuItem
REPORTEToolStripMenuItem
SALIRToolStripMenuItem

FORM PARA INGRESO DE DATOS

OBJETO CAN
T.
Names
Form 1 Form1
Panel 1 Panel1
Groupbo
x
1 GroupBox1
Textbox 6 Ingreso cdigo
Nombre
Categora

Cantidad
p. unitario
p. total
Labels 6 cdigo
Nombre
Categora

Cantidad
p. unitario
p. total

FORM PARA VISUALIZAR REPORTES

OBJETO CAN
T.
Names
Form 1 REPORTE
CrystalReportVie
wer
1 CrystalReportViewer1


FORM PARA VISUALIZAR CONSULTA

OBJETO CAN
T.
Names
PAULINA GUATAPI

Form 1 CONSULTA
DataGridView 1 DataGridView

CODIFICACION
Formulario principal
Public Class PRINCIPAL

Private Sub ProductosToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles ProductosToolStripMenuItem.Click
Dim MDIFORM As New Form1
MDIFORM.MdiParent = Me
MDIFORM.Show()


End Sub

Private Sub SalidaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles SalidaToolStripMenuItem.Click
End

End Sub

Private Sub DATOSToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles DATOSToolStripMenuItem.Click
Dim MDIFORM As New CONSULTAS
MDIFORM.MdiParent = Me
MDIFORM.Show()

End Sub

Private Sub VisualizacionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles VisualizacionToolStripMenuItem.Click
Dim MDIFORM As New REPORTE
MDIFORM.MdiParent = Me
MDIFORM.Show()
End Sub
End Class

LOGINFORM1

Public Class LoginForm1

' TODO: inserte el cdigo para realizar autenticacin personalizada usando el nombre de
usuario y la contrasea 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 continuacin:
' My.User.CurrentPrincipal = CustomPrincipal
' donde CustomPrincipal es la implementacin de IPrincipal utilizada para realizar la
autenticacin.
' Posteriormente, My.User devolver la informacin de identidad encapsulada en el objeto
CustomPrincipal
PAULINA GUATAPI

' 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 = "1234" Then
MsgBox("BIENVENIDOS")
Me.Hide()
PRINCIPAL.Show()
Else
MsgBox("Password incorrecto")
UsernameTextBox.Text = ""
PasswordTextBox.Text = ""
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

End Class


TABLA INGRESO DE DATOS
Public Class Form1

Private Sub DATOSBindingNavigatorSaveItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)

End Sub

Private Sub DATOSBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles DATOSBindingNavigatorSaveItem.Click
Me.Validate()
Me.DATOSBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.PRODUCTOSDataSet)

End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'TODO: esta lnea de cdigo carga datos en la tabla 'PRODUCTOSDataSet.DATOS' Puede
moverla o quitarla segn sea necesario.
Me.DATOSTableAdapter.Fill(Me.PRODUCTOSDataSet.DATOS)

End Sub

Private Sub P_UNITARIOTextBox_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles P_UNITARIOTextBox.TextChanged
P_TOTALTextBox.Text = Format(Val(P_UNITARIOTextBox.Text) *
Val(CANTIDADTextBox.Text), "###,00")

End Sub

PAULINA GUATAPI

Private Sub P_TOTALTextBox_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles P_TOTALTextBox.TextChanged

End Sub

Private Sub CANTIDADTextBox_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles CANTIDADTextBox.TextChanged
P_TOTALTextBox.Text = Format(Val(P_UNITARIOTextBox.Text) *
Val(CANTIDADTextBox.Text), "###,00")

End Sub
End Class


Pantalla de ingreso de clave




Pgina Principal (menu)
PAULINA GUATAPI



Pgina de consulta






CONCLUSIONES
Este proyecto es muy til para manejo de una base de datos a nivel empresarial en
donde podemos guardar productos con sus valores y calcular precios acumulados.
Hemos hecho uso de importantes herramientas de visual que nos da una facilidad de
manejar los formularios con diseos a nuestro gusto.

S-ar putea să vă placă și