Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/08/2011, 07:25
Avatar de lokoman
lokoman
 
Fecha de Ingreso: septiembre-2009
Mensajes: 502
Antigüedad: 14 años, 7 meses
Puntos: 47
Respuesta: Login y password (imagen) en Visual 6.0 con Access

Hola!!
Aqui tienes la base para que continues:

http://myfreefilehosting.com/f/ae891a8938_0.04MB

El codigo del form login:

Código vb:
Ver original
  1. Private Sub cmdAceptar_Click()
  2.     If Trim(txtUsuario.Text) = "PROFE" Then
  3.         If Trim(txtPassword.Text) = "1234" Then
  4.             Nombre_Profe = "LOKOMAN"
  5.            
  6.             frmPrograma.Show
  7.             Unload Me
  8.         Else
  9.             MsgBox "PASSWORD INVALIDO!!", vbInformation
  10.             txtPassword.SetFocus
  11.         End If
  12.     Else
  13.         MsgBox "USUARIO INVALIDO!!", vbInformation
  14.         txtUsuario.SetFocus
  15.     End If
  16. End Sub

El codigo del form principal:

Código vb:
Ver original
  1. Sub Carga_Foto()
  2.     If Len(Dir(App.Path & "\Foto_Profe1.jpg")) > 0 Then
  3.         img.Picture = LoadPicture(App.Path & "\Foto_Profe1.jpg")
  4.     Else
  5.         img.Picture = Nothing
  6.         lblErrorFoto.Caption = "No se encontró la foto del profe!!"
  7.     End If
  8. End Sub
  9.  
  10. Private Sub Form_Load()
  11.     lblInformacion.Caption = "Bienvenido profe " & UCase(Mid(Nombre_Profe, 1, 1)) & LCase(Mid(Nombre_Profe, 2)) & " !!"
  12.    
  13.     Carga_Foto
  14. End Sub

El codigo del modulo:

Código vb:
Ver original
  1. Public Nombre_Profe As String

Te dejo para que investigar:
• La conexión a la base de datos
• Hacer consultas a la base de datos con Recordsets

Simplemente debes ajustar a tus necesidades la base que te dejo, nos cuentas tus avances!!!