⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmchgpwd.frm

📁 程序加密算法
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmPWord 
   BackColor       =   &H00E0E0E0&
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   2190
   ClientLeft      =   2325
   ClientTop       =   2100
   ClientWidth     =   5490
   ControlBox      =   0   'False
   Icon            =   "frmChgPWD.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2190
   ScaleWidth      =   5490
   Begin VB.TextBox txtPassword 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1500
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1500
      Width           =   2600
   End
   Begin VB.CommandButton cmdChoice 
      Caption         =   "&OK"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   0
      Left            =   4320
      TabIndex        =   2
      Top             =   1020
      Width           =   975
   End
   Begin VB.CommandButton cmdChoice 
      Caption         =   "&Cancel"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Index           =   1
      Left            =   4320
      TabIndex        =   3
      Top             =   1470
      Width           =   975
   End
   Begin VB.TextBox txtPassword 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   1500
      TabIndex        =   0
      Top             =   1035
      Width           =   2600
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Password"
      Height          =   195
      Index           =   1
      Left            =   615
      TabIndex        =   7
      Top             =   1605
      Width           =   690
   End
   Begin VB.Label lblMyLabel 
      Alignment       =   1  'Right Justify
      BackStyle       =   0  'Transparent
      Height          =   240
      Left            =   1200
      TabIndex        =   6
      Top             =   1980
      Width           =   4065
   End
   Begin VB.Label lblTitle 
      Alignment       =   2  'Center
      BackColor       =   &H000000FF&
      BorderStyle     =   1  'Fixed Single
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   15.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   825
      Left            =   180
      TabIndex        =   5
      Top             =   60
      Width           =   5190
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "User ID"
      Height          =   195
      Index           =   0
      Left            =   765
      TabIndex        =   4
      Top             =   1140
      Width           =   540
   End
End
Attribute VB_Name = "frmPWord"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

' ---------------------------------------------------------------------------
' Define module level variables
' ---------------------------------------------------------------------------
  Private m_strPassword  As String
  
Public Sub Reset_frmPWord()

' ---------------------------------------------------------------------------
' Initialize variables
' ---------------------------------------------------------------------------
  m_strPassword = ""
  
' ---------------------------------------------------------------------------
' Display the form
' ---------------------------------------------------------------------------
  With frmPWord
       .txtPassword(0).Text = ""
       .txtPassword(1).Text = ""
       .Show vbModeless
       .Refresh
  End With
  
End Sub

Private Sub cmdChoice_Click(Index As Integer)

' ---------------------------------------------------------------------------
' Based on the button pressed
' ---------------------------------------------------------------------------
  Select Case Index
         
         ' OK button was pressed.
         ' Time to test the input.
         Case 0:
              ' Test data input
              If Len(g_strUserID) = 0 Then
                  MsgBox "A valid user ID must be entered.", _
                         vbInformation + vbOKOnly, "User ID missing"
                  txtPassword(0).SetFocus
                  Exit Sub
              Else
                  ' build SQL statement
                  g_SQLstmt = "SELECT * FROM [PWord] Where [UserID] = '" & g_strUserID & "'"
                  
                  ' Is this user on file?
                  If Not Query_User() Then
                      Clear_Variables
                      m_strPassword = ""
                      txtPassword(1) = ""
                      txtPassword(0).SetFocus
                      Exit Sub
                  End If
              End If
              
              If Not Validate_Password_Entry(m_strPassword) Then
                  m_strPassword = ""
                  txtPassword(1) = ""
                  txtPassword(1).SetFocus
                  Exit Sub
              End If
             
              ' Build the new password and
              ' update the database
              If Build_Password(m_strPassword) Then
                  Clear_Variables
                  frmChgPass.Hide
                  frmMainMenu.Show
              Else
                  m_strPassword = ""
                  txtPassword(1) = ""
                  txtPassword(1).SetFocus
                  Exit Sub
              End If
             
         ' Cancel button was pressed.
         Case 1:
              Clear_Variables
              frmPWord.Hide
              frmMainMenu.Show
  End Select
  
End Sub
Private Function Good_Old_Password() As Boolean

' ---------------------------------------------------------------------------
' Define local variables
' ---------------------------------------------------------------------------
  Dim strInText      As String
  Dim strHashed      As String
  Dim intLength      As Integer
  Dim cMD5           As clsMD5
  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -