📄 passwordchange.frm
字号:
VERSION 5.00
Begin VB.Form UserPWDChange
BorderStyle = 1 'Fixed Single
Caption = "密码修改"
ClientHeight = 3240
ClientLeft = 45
ClientTop = 435
ClientWidth = 4800
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3240
ScaleWidth = 4800
Begin VB.Frame Frame1
Height = 2895
Left = 360
TabIndex = 0
Top = 120
Width = 4095
Begin VB.CommandButton Command1
Caption = "确认修改"
Height = 375
Left = 1200
TabIndex = 7
Top = 2400
Width = 1335
End
Begin VB.TextBox Text3
Height = 375
Left = 1440
TabIndex = 6
Top = 1680
Width = 1815
End
Begin VB.TextBox Text2
Height = 375
Left = 1440
TabIndex = 5
Top = 960
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 4
Top = 240
Width = 1815
End
Begin VB.Label Label3
Caption = "再次输入:"
Height = 255
Left = 240
TabIndex = 3
Top = 1680
Width = 975
End
Begin VB.Label Label2
Caption = "新密码:"
Height = 375
Left = 480
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "旧密码:"
Height = 375
Left = 480
TabIndex = 1
Top = 360
Width = 735
End
End
End
Attribute VB_Name = "UserPWDChange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If sysuserPWD <> Trim(Text1.Text) Then
MsgBox "输入旧密码不正确!", vbOKOnly + vbExclamation, "怎么回事"
Exit Sub
End If
If Trim(Text2.Text) <> Trim(Text3.Text) Then
MsgBox "前后输入的新密码不一致!", vbOKOnly + vbExclamation, "怎么回事"
Exit Sub
End If
Dim txtsql As String
Dim msgtext As String
txtsql = "select UserName,UserPWD from UserTable where UserName='" & sysusername & "'"
Set mrc = ExecuteSQL(txtsql, msgtext)
mrc.Fields(1) = Trim(Text2.Text)
mrc.Update
mrc.Close
MsgBox "修改密码成功!", vbOKOnly + vbExclamation, "恭喜"
Unload Me
StudentManger.Hide
sysusername = ""
sysuserPWD = ""
StudentLogin.Show
MsgBox "现在请用你的新密码登录!", vbOKOnly + vbExclamation, "对不起"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -