BIENVENIDOS A SYDEVOEL
Private Sub Form_Load()
Skin1.LoadSkin ("F:\Helen Teran\SYDEVOEL\Cosas del Proyecto\Skin\26.skn")
Skin1.ApplySkin Form1.hWnd
Skin1.ApplySkin Form2.hWnd
Skin1.ApplySkin Form3.hWnd
Skin1.ApplySkin Form4.hWnd
Skin1.ApplySkin Form5.hWnd
Skin1.ApplySkin Form6.hWnd
Skin1.ApplySkin Form7.hWnd
Skin1.ApplySkin Form8.hWnd
Skin1.ApplySkin Form9.hWnd
Skin1.ApplySkin Form10.hWnd
End Sub
INICIO ENCARGADO
Private Sub Command1_Click()
If Text1.Text = "encargado" And Text2.Text = "encargado" Then
Form4.Show
Me.Hide
Else
MsgBox "Los datos que ingreso son incorrectos, verifique y vuelva a intentar ", vbCritical, "Aviso Importante"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
Frame1.Visible = True
Frame2.Visible = False
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Form_Activate()
Option1.Value = False
Option2.Value = False
Frame1.Visible = True
Frame2.Visible = False
End Sub
Private Sub Frame2_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Form3.Show
Me.Hide
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Frame1.Visible = False
Frame2.Visible = True
End If
Option2.Value = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "encargado" And Text2.Text = "encargado" Then
Form4.Show
Me.Hide
Else
MsgBox "Los datos que ingreso son incorrectos, verifique y vuelva a intentar ", vbCritical, "Aviso Importante"
End If
End If
INICIO DEL ESTUDIANTE
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Dim Nombre As String
Dim Contraseña As String
Dim mensaje As String
Form3.Data1.Refresh
Nombre = Text1
Contraseña = Text2
Do Until Form3.Data1.Recordset.EOF
If Form3.Data1.Recordset.Fields("Nombre").Value = Nombre And Form3.Data1.Recordset.Fields("Contraseña").Value = Contraseña Then
MsgBox "Hola " & Nombre & ", ¿Cómo has estado, Listo para realizar tu Voto?", vbOKOnly, "Bienvenido al Programa"
Text1.Text = ""
Text2.Text = ""
Data1.Recordset.Delete
Data1.Refresh
Form10.Show
Me.Hide
Exit Sub
Else
Form3.Data1.Recordset.MoveNext
End If
Loop
Mensaje = MsgBox("El Usuario de Nombre " & Nombre & ", no se encuentra registrado o en su defecto ya realizo su voto", vbOKOnly, "Atención, Usuario No Autorizado!!!")
If (mensaje = 1) Then
Form3.Show
Text1 = ""
Text2 = ""
Text1.SetFocus
Else
End
End If
End If
End Sub
VOTACIONES
Private Sub Form_Activate()
Form10.Label1.Caption = Form9.Text1.Text
Form10.label2.Caption = Form9.Text2.Text
Form10.Label3.Caption = Form9.Text3.Text
Form10.Label4.Caption = Form9.Text4.Text
Form10.Label5.Caption = Form9.Text5.Text
Form10.Label6.Caption = Form9.Text6.Text
Form10.Label7.Caption = Form9.Text7.Text
Form10.Label8.Caption = Form9.Text8.Text
Image1.Picture = LoadPicture(Form9.CommonDialog1.FileName)
Image2.Picture = LoadPicture(Form9.CommonDialog2.FileName)
Image3.Picture = LoadPicture(Form9.CommonDialog3.FileName)
Image4.Picture = LoadPicture(Form9.CommonDialog4.FileName)
Image5.Picture = LoadPicture(Form9.CommonDialog5.FileName)
Image6.Picture = LoadPicture(Form9.CommonDialog6.FileName)
Image7.Picture = LoadPicture(Form9.CommonDialog7.FileName)
Image8.Picture = LoadPicture(Form9.CommonDialog8.FileName)
Image9.Visible = False
Image10.Visible = False
Image11.Visible = False
Image12.Visible = False
Image13.Visible = False
Image14.Visible = False
Image15.Visible = False
Image16.Visible = False
End Sub
Private Sub Image1_Click()
Image9.Visible = True
Form6.Text1.Text = Val(Form6.Text1.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image2_Click()
Image10.Visible = True
Form6.Text2.Text = Val(Form6.Text2.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image3_Click()
Image11.Visible = True
Form6.Text3.Text = Val(Form6.Text3.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image4_Click()
Image12.Visible = True
Form6.Text4.Text = Val(Form6.Text4.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image5_Click()
Image13.Visible = True
Form6.Text5.Text = Val(Form6.Text5.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image6_Click()
Image14.Visible = True
Form6.Text6.Text = Val(Form6.Text6.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image7_Click()
Image15.Visible = True
Form6.Text7.Text = Val(Form6.Text7.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
Private Sub Image8_Click()
Image16.Visible = True
Form6.Text8.Text = Val(Form6.Text8.Text) + 1
MsgBox "Gracias por su voto, espero los resultados", vbInformation, "Aviso Importante"
Form3.Show
Me.Hide
End Sub
INICIO DEL ENCARGADO
Private Sub Option1_Click()
If Option1.Value = True Then
Form3.Show
Me.Hide
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Frame1.Visible = False
Frame2.Visible = True
End If
Option2.Value = False
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "encargado" And Text2.Text = "encargado" Then
Form4.Show
Me.Hide
Else
MsgBox "Los datos que ingreso son incorrectos, verifique y vuelva a intentar ", vbCritical, "Aviso Importante"
End If
End If
End Sub
OPCIONES
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
label2.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label4.BackColor = &H8000000F
Label1.BackColor = &H8000000F
Label5.BackColor = &H8000000F
End Sub
Private Sub Label1_Click()
Form8.Show
Me.Hide
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.BackColor = &H808080
label2.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label4.BackColor = &H8000000F
Label5.BackColor = &H8000000F
End Sub
Private Sub Label2_Click()
Form5.Show
Me.Hide
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
label2.BackColor = &H808080
Label1.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label4.BackColor = &H8000000F
Label5.BackColor = &H8000000F
End Sub
Private Sub Label3_Click()
Form6.Show
Me.Hide
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.BackColor = &H808080
label2.BackColor = &H8000000F
Label1.BackColor = &H8000000F
Label4.BackColor = &H8000000F
Label5.BackColor = &H8000000F
End Sub
Private Sub Label4_Click()
Form7.Show
Me.Hide
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.BackColor = &H808080
label2.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label1.BackColor = &H8000000F
Label5.BackColor = &H8000000F
End Sub
Private Sub Label5_Click()
Form2.Show
Me.Hide
End Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label5.BackColor = &H808080
label2.BackColor = &H8000000F
Label3.BackColor = &H8000000F
Label1.BackColor = &H8000000F
Label4.BackColor = &H8000000F
AGRAGAR CANDIDATOS
Private Sub Text5_KeyPress(KeyAscii As Integer)
KeyAscii = Verificar_Tecla(KeyAscii)
If KeyAscii = 13 Then
If Text5.Text = "2" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "3" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "4" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Text4.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Command4.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "5" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Text4.Visible = True
Form9.Text5.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Command4.Visible = True
Form9.Command5.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "6" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Text4.Visible = True
Form9.Text5.Visible = True
Form9.Text6.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Command4.Visible = True
Form9.Command5.Visible = True
Form9.Command6.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "7" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Text4.Visible = True
Form9.Text5.Visible = True
Form9.Text6.Visible = True
Form9.Text7.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Command4.Visible = True
Form9.Command5.Visible = True
Form9.Command6.Visible = True
Form9.Command7.Visible = True
Form9.Show
Me.Hide
End If
If Text5.Text = "7" Then
Form9.Text1.Visible = True
Form9.Text2.Visible = True
Form9.Text3.Visible = True
Form9.Text4.Visible = True
Form9.Text5.Visible = True
Form9.Text6.Visible = True
Form9.Text7.Visible = True
Form9.Text8.Visible = True
Form9.Command1.Visible = True
Form9.Command2.Visible = True
Form9.Command3.Visible = True
Form9.Command4.Visible = True
Form9.Command5.Visible = True
Form9.Command6.Visible = True
Form9.Command7.Visible = True
Form9.Command8.Visible = True
Form9.Show
Me.Hide
End If
End If
End Sub
Function Verificar_Tecla(Tecla_Presionada)
Dim Teclas As String
'Acepta todos los números, la tecla Backspace, _
la tecla Enter, la coma y el punto
Teclas = "2345678" & Chr(vbKeyBack)
If InStr(1, Teclas, Chr(Tecla_Presionada)) Then
Verificar_Tecla = Tecla_Presionada
Else
' Si no es ninguna de las indicadas retorna 0
Verificar_Tecla = 0
End If
End Function
AGREGAR DATOS DE CANDIDATOS
Private Sub Command1_Click()
CommonDialog1.DialogTitle = "Seleccione Imagen"
CommonDialog1.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog1.ShowOpen
End Sub
Private Sub Command2_Click()
CommonDialog2.DialogTitle = "Seleccione Imagen"
CommonDialog2.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog2.ShowOpen
End Sub
Private Sub Command3_Click()
CommonDialog3.DialogTitle = "Seleccione Imagen"
CommonDialog3.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog3.ShowOpen
End Sub
Private Sub Command4_Click()
CommonDialog4.DialogTitle = "Seleccione Imagen"
CommonDialog4.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog4.ShowOpen
End Sub
Private Sub Command5_Click()
CommonDialog5.DialogTitle = "Seleccione Imagen"
CommonDialog5.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog5.ShowOpen
End Sub
Private Sub Command6_Click()
CommonDialog6.DialogTitle = "Seleccione Imagen"
CommonDialog6.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog6.ShowOpen
End Sub
Private Sub Command7_Click()
CommonDialog7.DialogTitle = "Seleccione Imagen"
CommonDialog7.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog7.ShowOpen
End Sub
Private Sub Command8_Click()
CommonDialog8.DialogTitle = "Seleccione Imagen"
CommonDialog8.Filter = "JPG|*.JPG|GIF|*.GIF|Todos los archivos|*.*"
CommonDialog8.ShowOpen
End Sub
Private Sub Command9_Click()
Form4.Show
Me.Hide
End Sub
Private Sub Form_Load()
End Sub
Private Sub Text1_DblClick()
Text1.Text = ""
End Sub
Private Sub Text2_DblClick()
Text2.Text = ""
End Sub
Private Sub Text3_DblClick()
Text3.Text = ""
End Sub
Private Sub Text4_DblClick()
Text4.Text = ""
End Sub
Private Sub Text5_DblClick()
Text5.Text = ""
End Sub
Private Sub Text6_DblClick()
Text6.Text = ""
End Sub
Private Sub Text7_DblClick()
Text7.Text = ""
End Sub
Private Sub Text8_DblClick()
Text8.Text = ""
End Sub
REGISTRO NUEVO
Private Sub Command1_Click()
Data1.UpdateRecord
Data1.Refresh
MsgBox "El Usuario ha sido Guardado en la Base de Datos", vbExclamation, "Aviso Importante"
Me.Hide
Form4.Show
Me.Hide
End Sub
Private Sub Command2_Click()
Form4.Show
Me.Hide
End Sub
Private Sub Form_Activate()
Text1.SetFocus
Data1.Recordset.AddNew
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Data1.UpdateRecord
Data1.Refresh
MsgBox "El Usuario ha sido Guardado en la Base de Datos", vbExclamation, "Aviso Importante"
Me.Hide
Form4.Show
Me.Hide
End If
End Sub
RESULTADOS FINALES
Private Sub Command1_Click()
Form4.Show
Me.Hide
End Sub
Private Sub Form_Activate()
Form6.Label1.Caption = Form9.Text1.Text
Form6.label2.Caption = Form9.Text2.Text
Form6.Label3.Caption = Form9.Text3.Text
Form6.Label4.Caption = Form9.Text4.Text
Form6.Label5.Caption = Form9.Text5.Text
Form6.Label6.Caption = Form9.Text6.Text
Form6.Label7.Caption = Form9.Text7.Text
Form6.Label8.Caption = Form9.Text8.Text
Image1.Picture = LoadPicture(Form9.CommonDialog1.FileName)
Image2.Picture = LoadPicture(Form9.CommonDialog2.FileName)
Image3.Picture = LoadPicture(Form9.CommonDialog3.FileName)
Image4.Picture = LoadPicture(Form9.CommonDialog4.FileName)
Image5.Picture = LoadPicture(Form9.CommonDialog5.FileName)
Image6.Picture = LoadPicture(Form9.CommonDialog6.FileName)
Image7.Picture = LoadPicture(Form9.CommonDialog7.FileName)
Image8.Picture = LoadPicture(Form9.CommonDialog8.FileName)
End Sub