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

📄 frmchgpwd.frm

📁 学生学籍管理系统是一个教育单位不可缺少的部分,它的内容对于学校的决策者和管理者来说都至关重要,所以学生学籍管理系统应该能够为用户提供充足的信息和快捷的查询手段。但一直以来人们使用传统人工的方式管理文件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmchgpwd 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改用户密码"
   ClientHeight    =   1950
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4170
   Icon            =   "Frmchgpwd.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1950
   ScaleWidth      =   4170
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1440
      TabIndex        =   0
      Top             =   120
      Width           =   2415
   End
   Begin VB.TextBox Text2 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   600
      Width           =   2415
   End
   Begin VB.TextBox Text3 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1080
      Width           =   2415
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      Height          =   375
      Left            =   1440
      TabIndex        =   3
      Top             =   1500
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   375
      Left            =   2880
      TabIndex        =   4
      Top             =   1500
      Width           =   975
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "原来的密码:"
      Height          =   180
      Left            =   300
      TabIndex        =   7
      Top             =   180
      Width           =   1080
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "新的密码:"
      Height          =   180
      Left            =   480
      TabIndex        =   6
      Top             =   660
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "确认新的密码:"
      Height          =   180
      Left            =   120
      TabIndex        =   5
      Top             =   1080
      Width           =   1260
   End
End
Attribute VB_Name = "Frmchgpwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
 Private Sub Command1_Click()

Dim Oldpwd As String, pwd As String, confirmpwd As String

Oldpwd = Trim(Text1.Text)
pwd = Trim(Text2.Text)
confirmpwd = Trim(Text3.Text)

If Trim(Oldpwd) = "" Then
    MsgBox "请输入原来的密码!", vbInformation
    Text1.SetFocus
    Exit Sub
End If

If Trim(pwd) = "" Then
    MsgBox "请输入新的密码!", vbInformation
    Text2.SetFocus
    Exit Sub
End If

If Trim(confirmpwd) = "" Then
    MsgBox "请确认输入新的密码!", vbInformation
    Text3.SetFocus
    Exit Sub
End If

If Trim(pwd) <> Trim(confirmpwd) Then
    MsgBox "两次输入的密码不相同!", vbInformation
    Text2.Text = ""
    Text3.Text = ""
    Text2.SetFocus
    Exit Sub
End If

sqlstr = "select UserPWD from UserInfo where UserID='" & LoginUser & "'"
rs.Open sqlstr, con, 1, 1

If Not rs.EOF Then
    If rs("UserPWD") <> Oldpwd Then
        MsgBox "你输入的原密码不对!", vbInformation
        Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
        Text1.SetFocus
        Exit Sub
    Else
        sqlstr = "update UserInfo set UserPWD='" & pwd & "' where UserID='" & LoginUser & "'"
        con.Execute sqlstr
        MsgBox "您的密码更新成功,请牢记你的密码!", vbInformation
        Unload Me
    End If
Else
    MsgBox "异常错误!", vbInformation
End If
rs.Close: Set rs = Nothing
End Sub

Private Sub Command2_Click()
     Unload Me
End Sub


⌨️ 快捷键说明

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