📄 frmpas.frm
字号:
VERSION 5.00
Begin VB.Form PasModify
BackColor = &H008080FF&
Caption = "修改密码"
ClientHeight = 2190
ClientLeft = 60
ClientTop = 345
ClientWidth = 4125
Icon = "frmpas.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2190
ScaleWidth = 4125
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Cancel
Appearance = 0 'Flat
BackColor = &H00FFC0FF&
Caption = "取消"
Height = 375
Left = 2640
Style = 1 'Graphical
TabIndex = 7
Top = 1680
Width = 1095
End
Begin VB.CommandButton Modify
Appearance = 0 'Flat
BackColor = &H00FFC0FF&
Caption = "修改"
Height = 375
Left = 480
Style = 1 'Graphical
TabIndex = 6
Top = 1680
Width = 1215
End
Begin VB.TextBox NewPas2
BackColor = &H00C0FFFF&
ForeColor = &H00FF0000&
Height = 375
IMEMode = 3 'DISABLE
Left = 960
PasswordChar = "*"
TabIndex = 5
Top = 1080
Width = 2535
End
Begin VB.TextBox NewPas1
BackColor = &H00C0FFFF&
ForeColor = &H00FF0000&
Height = 375
IMEMode = 3 'DISABLE
Left = 960
PasswordChar = "*"
TabIndex = 4
Top = 600
Width = 2535
End
Begin VB.TextBox OldPas
BackColor = &H00C0E0FF&
ForeColor = &H00000000&
Height = 375
IMEMode = 3 'DISABLE
Left = 960
PasswordChar = "*"
TabIndex = 3
Top = 120
Width = 2535
End
Begin VB.Label Label3
BackColor = &H008080FF&
Caption = "验证:"
Height = 255
Left = 120
TabIndex = 2
Top = 1200
Width = 735
End
Begin VB.Label Label2
BackColor = &H008080FF&
Caption = "新密码:"
Height = 255
Left = 120
TabIndex = 1
Top = 720
Width = 735
End
Begin VB.Label Label1
BackColor = &H008080FF&
Caption = "原密码:"
Height = 255
Left = 120
TabIndex = 0
Top = 240
Width = 735
End
End
Attribute VB_Name = "PasModify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cancel_Click()
Unload Me
End Sub
Private Sub Modify_Click()
If OldPas.text <> UserPas Then
MsgBox "原密码错误!"
Exit Sub
End If
If NewPas1.text <> NewPas2.text Then
MsgBox "两次密码不一致!"
Exit Sub
End If
UserPas = NewPas1.text
'设置新密码
frmLogin.Data2.Recordset.Edit
frmLogin.Data2.Recordset.Fields("密码").Value = UserPas
frmLogin.Data2.Recordset.Update
MsgBox "修改成功!"
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -