aplicacion motos login

6

Click here to load reader

Upload: santos-rivera-lujan

Post on 03-Jul-2015

639 views

Category:

Education


0 download

DESCRIPTION

Mi faceboock: https://www.facebook.com/PatrickNilsdeAlesandro.RiveraLujan

TRANSCRIPT

Page 1: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

Public Class Validar_Usuario Dim usuario, contraseña As String Dim contTimer As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnvalidar.Click usuario = txtusuario.Text contraseña = txtcontraseña.Text Select Case usuario Case "santos" If contraseña = "123" Then Timer1.Start() End If Case "nilo" If contraseña = "1234" Then Timer1.Start() End If Case "norith" If contraseña = "12345" Then Timer1.Start() End If End Select End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick contTimer = contTimer + 1 ProgressBar1.Value = contTimer

Page 2: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

If contTimer = ProgressBar1.Maximum Then Timer1.Stop() contTimer = 0 Registrar.Show() Me.Hide() End If End Sub Private Sub Validar_Usuario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

Page 3: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

Public Class Registrar Dim I As Integer Dim depart As String Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbodepart.SelectedIndexChanged depart = cbodepart.SelectedItem Select Case depart Case "Lima" cboprov.Items.Clear() cboprov.Items.Add("San borja") cboprov.Items.Add("Vitarte") cboprov.Items.Add("San Isidro") cboprov.Items.Add("Baranco") Case "Libertad" cboprov.Items.Clear() cboprov.Items.Add("Moche") cboprov.Items.Add("Esperanza") cboprov.Items.Add("Delicias") cboprov.Items.Add("Miramar") Case "Chiclayo" cboprov.Items.Clear() cboprov.Items.Add("Vista Hermosa") cboprov.Items.Add("Punta Sal") Case "Tumbes" cboprov.Items.Clear() cboprov.Items.Add("Sipan") cboprov.Items.Add("San Antonio") End Select End Sub Private Sub btnregistrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnregistrar.Click VParticipante(I) = txtParticipante.Text Vedad(I) = Val(cboedad.SelectedItem) Vdpto(I) = cbodepart.SelectedItem Vprov(I) = cboprov.SelectedItem Vruta(I) = OpenFileDialog1.FileName Vfechanac(I) = DateTimePicker1.Value lstnombre.Items.Add(VParticipante(I)) lstedad.Items.Add(Vedad(I)) lstdepartamento.Items.Add(Vdpto(I)) lstprovincia.Items.Add(Vprov(I)) lstfechanac.Items.Add(Vfechanac(I)) txtParticipante.Text = "" cboedad.Text = "" cbodepart.Text = "" cboprov.Text = "" pcbfoto.ImageLocation = "" txtfechanac.Text = "" I = I + 1 fin = I - 1 End Sub

Page 4: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

Private Sub pcbfoto_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pcbfoto.Click Dim rutafoto As String OpenFileDialog1.ShowDialog() rutafoto = OpenFileDialog1.FileName pcbfoto.ImageLocation = rutafoto End Sub Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged txtfechanac.Text = DateTimePicker1.Value End Sub Private Sub pcbvotar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pcbvotar.Click Votacion.Show() Me.Hide() End Sub Private Sub Registrar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

Page 5: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

Public Class Votacion Dim posicion As Integer ' Dim I As Integer Private Sub Votacion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For I = 0 To fin cboselecGanadores.Items.Add(VParticipante(I)) Next End Sub Private Sub cboselecmiss_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboselecGanadores.SelectedIndexChanged posicion = cboselecGanadores.SelectedIndex For I = 0 To fin If posicion = I Then pcbSantImagen.ImageLocation = Vruta(I) txtpuntaje.Text = VpuntajePartici(I) End If Next End Sub Private Sub btnvotar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnvotar.Click posicion = cboselecGanadores.SelectedIndex For I = 0 To fin If posicion = I Then VpuntajePartici(I) = VpuntajePartici(I) + Val(cboselecpunt.SelectedItem) End If Next End Sub Private Sub btnresultado_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnresultado.Click Formresultado.Show() Me.Hide() End Sub End Class

Page 6: Aplicacion motos login

Programador y Analista De Sistemas : SANTOS NILO RIVERA LUJAN

Te amo Geraldine Mi web : http://programadorsantosrivera2030.blogspot.com/

Public Class Formresultado Dim tempnombrpar, temprutaPart As String Dim temppuntaje As Integer Private Sub pcbresultado_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pcbresultado.Click For I = 1 To fin For j = 0 To fin - 1 If VpuntajePartici(j) < VpuntajePartici(j + 1) Then tempnombrpar = VParticipante(j) VParticipante(j) = VParticipante(j + 1) VParticipante(j + 1) = tempnombrpar End If Next Next For I = 0 To fin lstGanadores.Items.Add(VParticipante(I)) lstpuntaje.Items.Add(VpuntajePartici(I)) Next pcbImagenRes.ImageLocation = Vruta(fin) End Sub Private Sub Formresultado_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class