📄 frmeditpwd.frm
字号:
VERSION 5.00
Begin VB.Form frmEditPwd
Caption = "修改密码"
ClientHeight = 3585
ClientLeft = 60
ClientTop = 450
ClientWidth = 5625
LinkTopic = "Form1"
ScaleHeight = 3585
ScaleWidth = 5625
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdcancel
Caption = "取 消"
Height = 495
Left = 2880
TabIndex = 7
Top = 2760
Width = 1215
End
Begin VB.CommandButton cmdsave
Caption = "确 定"
Height = 495
Left = 960
TabIndex = 6
Top = 2760
Width = 1215
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 5
Top = 1920
Width = 2655
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 3
Top = 1320
Width = 2655
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 2655
End
Begin VB.Label Label3
Caption = "重输入新密码:"
Height = 255
Left = 600
TabIndex = 4
Top = 2040
Width = 1335
End
Begin VB.Label Label2
Caption = "请输入新密码:"
Height = 255
Left = 600
TabIndex = 2
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "请输入旧密码:"
Height = 255
Left = 600
TabIndex = 0
Top = 840
Width = 1215
End
End
Attribute VB_Name = "frmEditPwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdSave_Click()
If Text1.Text <> pwd Then
MsgBox "旧密码输入错误,操作取消"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Exit Sub
End If
If Text2.Text = Text3.Text Then '判断二次密码输入是否相同
If Len(Text2.Text) < 6 Then
MsgBox "密码长度不能小于6!", , "修改密码"
Exit Sub
End If
'更新该帐号的密码
Set con = New ADODB.Connection
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=图书销售系统;Data Source=1062781987F44B5"
con.Execute "update Operator set Password='" & Text2.Text & "' where Account='" & username & "'"
MsgBox "密码修改成功!", , "修改密码"
Unload Me
Else
MsgBox "二次输入密码不正确"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -