VERSION 5.00
Begin VB.Form frmAutentificacion 
   Caption         =   "Actualizacion Clave Cstore"
   ClientHeight    =   1335
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4815
   ClipControls    =   0   'False
   Icon            =   "frmAutentificacion.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   1335
   ScaleWidth      =   4815
   Begin VB.CommandButton cmdCancelar 
      Cancel          =   -1  'True
      Caption         =   "&Cancelar"
      Height          =   375
      Left            =   3600
      TabIndex        =   7
      Top             =   720
      Width           =   975
   End
   Begin VB.CommandButton cmdAceptar 
      Caption         =   "&Aceptar"
      Default         =   -1  'True
      Height          =   375
      Left            =   3600
      TabIndex        =   6
      Top             =   360
      Width           =   975
   End
   Begin VB.TextBox txtConfima 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      MaxLength       =   25
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   960
      Width           =   1935
   End
   Begin VB.TextBox txtNueva 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      MaxLength       =   25
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   600
      Width           =   1935
   End
   Begin VB.TextBox txtActual 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      MaxLength       =   25
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   240
      Width           =   1935
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Confime Clave"
      Height          =   195
      Left            =   120
      TabIndex        =   4
      Top             =   960
      Width           =   1020
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "Nueva Clave"
      Height          =   195
      Left            =   240
      TabIndex        =   3
      Top             =   600
      Width           =   930
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "Clave Actual"
      Height          =   195
      Left            =   240
      TabIndex        =   2
      Top             =   240
      Width           =   900
   End
End
Attribute VB_Name = "frmAutentificacion"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Sub salir_formulario()
    ' validar que no haya procesos pendientes
    ' si no hay problemas
    MDIFUtilitarios.Toolbar1.Buttons(18).Caption = "Salir"    ' boton salir
    Unload Me
End Sub
Private Sub Salir()
    Unload Me
End Sub
Private Sub cmdAceptar_Click()
If UCase(Trim(txtActual.Text)) = gsClaveAnula Then
    If UCase(Trim(txtNueva.Text)) = UCase(Trim(txtConfima.Text)) Then
        CadSql = "update setup set clave = '" & UCase(Trim(txtNueva.Text)) & "' "
        MyCon.Execute CadSql
        MsgBox "Se actualizo Clave", vbInformation + 0
        gsClaveAnula = UCase(Trim(txtNueva.Text))
        Unload Me
        Exit Sub
    Else
        MsgBox "Nueva clave y confirmacion no coinciden. Verifique!!!", vbExclamation + 0
        txtNueva.SetFocus
        Exit Sub
    End If
Else
    MsgBox "Clave Actual incorrecta!!!", vbExclamation + 0
    txtActual.SetFocus
    Exit Sub
End If
End Sub

Private Sub cmdCancelar_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.Height = 1740
Me.Width = 4935
End Sub

Private Sub txtActual_GotFocus()
txtActual.SelStart = 0
txtActual.SelLength = Len(txtActual.Text)
End Sub

Private Sub txtActual_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtNueva.SetFocus

End Sub

Private Sub txtConfima_GotFocus()
txtConfima.SelStart = 0
txtConfima.SelLength = Len(txtConfima.Text)
End Sub

Private Sub txtConfima_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then cmdAceptar.SetFocus
End Sub

Private Sub txtNueva_GotFocus()
txtNueva.SelStart = 0
txtNueva.SelLength = Len(txtNueva.Text)
End Sub

Private Sub txtNueva_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then txtConfima.SetFocus
End Sub
