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

📄 frm_pass.frm

📁 ktv场所的包房开房、迎宾、预定管理系统。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_pass 
   Caption         =   "更改密码"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox pass2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1980
      MaxLength       =   10
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   1080
      Width           =   1965
   End
   Begin VB.TextBox pass3 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1980
      MaxLength       =   10
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1575
      Width           =   1965
   End
   Begin VB.TextBox pass1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1980
      MaxLength       =   10
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   600
      Width           =   1965
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   2655
      TabIndex        =   2
      Top             =   2250
      Width           =   1275
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&O)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   435
      Left            =   1065
      TabIndex        =   1
      Top             =   2235
      Width           =   1275
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "新 密 码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   1005
      TabIndex        =   5
      Top             =   1170
      Width           =   1050
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "确    认:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   990
      TabIndex        =   4
      Top             =   1635
      Width           =   1050
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "原 密 码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   1020
      TabIndex        =   3
      Top             =   675
      Width           =   1050
   End
End
Attribute VB_Name = "frm_pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub pass1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     pass2.SetFocus
  End If
End Sub

Private Sub pass2_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     pass3.SetFocus
  End If
End Sub

Private Sub pass3_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
    Command1.SetFocus
  End If
End Sub

Private Sub Command1_Click()
Dim strsql As String
Dim msgtext As String
Dim mrc As ADODB.Recordset
            
    strsql = "select * from users where user_id='" & strCurUser & "'"
    Set mrc = ExecuteSQL(strsql, msgtext)
    If mrc!user_pass = pass1.text Then
       If pass2.text = pass3.text Then
          strsql = "update users set user_pass='" & pass3.text & "'"
          strsql = strsql & " where user_id='" & strCurUser & "'"
          Set mrc = ExecuteSQL(strsql, msgtext)
          MsgBox "密码更改成功!", vbOKOnly, "提示"
          Unload Me
       Else
       MsgBox "请确认您输入的新密码!", vbOKOnly, "提示"
       pass2.text = ""
       pass3.text = ""
       End If
    Else
       MsgBox "原密码输入错误!请重新输入", vbOKOnly, "提示"
       pass1.text = ""
    End If
End Sub

⌨️ 快捷键说明

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