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

📄 frmchangepwd.frm

📁 通讯录
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmChangePwd 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改密码"
   ClientHeight    =   3090
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4680
   Icon            =   "frmChangePwd.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtOldPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1785
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   720
      Width           =   2325
   End
   Begin VB.TextBox txtUserName 
      Height          =   345
      Left            =   1785
      TabIndex        =   0
      Top             =   240
      Width           =   2325
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   390
      Left            =   1470
      TabIndex        =   4
      Top             =   2085
      Width           =   1140
   End
   Begin VB.CommandButton cmdBack 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   390
      Left            =   3075
      TabIndex        =   5
      Top             =   2085
      Width           =   1140
   End
   Begin VB.TextBox txtPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1110
      Width           =   2325
   End
   Begin VB.TextBox txtRepassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1575
      Width           =   2325
   End
   Begin VB.Label lblLabels 
      Caption         =   "旧密码(&P):"
      Height          =   270
      Index           =   3
      Left            =   600
      TabIndex        =   9
      Top             =   735
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名称(&U):"
      Height          =   270
      Index           =   0
      Left            =   600
      TabIndex        =   8
      Top             =   255
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "新密码(&P):"
      Height          =   270
      Index           =   1
      Left            =   600
      TabIndex        =   7
      Top             =   1125
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "重复新密码(&P):"
      Height          =   270
      Index           =   2
      Left            =   360
      TabIndex        =   6
      Top             =   1575
      Width           =   1320
   End
End
Attribute VB_Name = "frmChangePwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdBack_Click()
Unload frmChangePwd
End Sub

Private Sub cmdOK_Click()
Dim strUser$, strOldPwd$, strPwd$, strRePwd$
strUser = Trim(txtUserName.Text)
strOldPwd = Trim(txtOldPassword.Text)
strPwd = Trim(txtPassword.Text)
strRePwd = Trim(txtRepassword.Text)
If strUser = "" Or strPwd = "" Or strRePwd = "" Then
   MsgBox "信息未输入完全!", 48, "提示"
   Exit Sub
End If
If strPwd <> strRePwd Then
    MsgBox "两次密码不一致!", 48, "提示"
    txtPassword.Text = ""
    txtRepassword.Text = ""
    txtPassword.SetFocus
    Exit Sub
End If
strSQL = "select * from userinfo where uname='" + strUser + "'"
Set RS = conn.Execute(strSQL)
If RS.EOF Then
    MsgBox "该用户不存在!", 48, "提示"
    txtUserName.Text = ""
    txtUserName.SetFocus
    RS.Close
    Exit Sub
End If
If RS("upwd") <> strOldPwd Then
    MsgBox "旧密码不正确!", 48, "提示"
    txtOldPassword.Text = ""
    txtOldPassword.SetFocus
    RS.Close
    Exit Sub
End If
strSQL = "update userinfo set upwd='" + strPwd + "' where uname='" + strUser + "'"
conn.Execute strSQL
MsgBox "修改成功!", 64, "提示"
RS.Close
End Sub

⌨️ 快捷键说明

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