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

📄 frmupdatepw.frm

📁 银行储蓄系统,包括各种功能,能用于课程设计,相当不错
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmUpdatePW 
   BackColor       =   &H80000000&
   Caption         =   "Form1"
   ClientHeight    =   1815
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5205
   LinkTopic       =   "Form1"
   ScaleHeight     =   1815
   ScaleWidth      =   5205
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox txt 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   240
      Width           =   1695
   End
   Begin VB.TextBox txt 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   720
      Width           =   1695
   End
   Begin VB.TextBox txt 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   2
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1200
      Width           =   1695
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   345
      Left            =   3960
      TabIndex        =   1
      Top             =   360
      Width           =   975
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   345
      Left            =   3960
      TabIndex        =   0
      Top             =   960
      Width           =   975
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "旧密码:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Index           =   0
      Left            =   240
      TabIndex        =   7
      Top             =   360
      Width           =   720
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "新密码:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Index           =   1
      Left            =   240
      TabIndex        =   6
      Top             =   840
      Width           =   720
   End
   Begin VB.Label lbl 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "确认新密码:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Index           =   2
      Left            =   240
      TabIndex        =   5
      Top             =   1320
      Width           =   1080
   End
End
Attribute VB_Name = "frmUpdatePW"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset

'响应 "关闭" 按钮
Private Sub cmdCancel_Click()
    Unload Me
End Sub

'响应 "确定" 按钮
Private Sub cmdOK_Click()
    Set rst = New Recordset
    Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
    con.Open
    rst.Open "select password from users where name='" & userName & "'", con, adOpenDynamic, adLockOptimistic
    If rst!password <> txt(0).Text Then
        MsgBox "旧密码不对,请重新输入!"
        Exit Sub
    End If
    If txt(1).Text <> txt(2).Text Then
        MsgBox "两次输入的密码不同,请重新输入!"
        Exit Sub
    End If
    If Len(txt(1).Text) > 12 Then
        MsgBox "密码长度不得大于12位!"
        Exit Sub
    End If
    rst.Close
    con.Execute "update users set password='" & txt(1).Text & "' where name='" & userName & "'"
    con.Close
    MsgBox "密码更新成功!"
    Unload Me
End Sub

⌨️ 快捷键说明

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