📄 frm_modiuser.frm
字号:
VERSION 5.00
Begin VB.Form Frm_modiUser
Caption = "修改密码"
ClientHeight = 3165
ClientLeft = 60
ClientTop = 375
ClientWidth = 4680
LinkTopic = "Form2"
ScaleHeight = 3165
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2280
TabIndex = 7
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 720
TabIndex = 6
Top = 2640
Width = 1215
End
Begin VB.TextBox txtSurePwd
Height = 390
Left = 1800
TabIndex = 5
Top = 1920
Width = 2295
End
Begin VB.TextBox txtNewPwd
Height = 390
Left = 1800
TabIndex = 4
Top = 1200
Width = 2295
End
Begin VB.TextBox txtOldPwd
Height = 375
Left = 1800
TabIndex = 3
Top = 480
Width = 2295
End
Begin VB.Label Label3
Caption = "确认新密码"
Height = 375
Left = 480
TabIndex = 2
Top = 1920
Width = 1215
End
Begin VB.Label Label2
Caption = "输入新密码"
Height = 375
Left = 480
TabIndex = 1
Top = 1200
Width = 1215
End
Begin VB.Label Label1
Caption = "输入原密码"
Height = 375
Left = 480
TabIndex = 0
Top = 480
Width = 1215
End
End
Attribute VB_Name = "Frm_modiUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Trim(txtOldPwd) = oldPwd Then
Adodcl.RecordSource = "select * from Users where User_name'" + Trim(username) + "'"
Adodcl.Refresh
If txtSurePwd = "" Then
MsgBox " 请确认密码"
txtSurePwd.SetFocus
Exit Sub
End If
If txtNewPwd <> txtSurePwd Then
MsgBox " 密码和确认密码不相同,请重新确认"
txtSurePwd.SetFocus
txtSurePwd.SelStart = 0
txtSurePwd.SelLength = Len(txtSurePwd)
Exit Sub
End If
Adodcl.Recordset.Fields(1).Value = Trim(txtNewPwd.Text)
Adodcl.Recordset.Update
MsgBox "修改成功"
End If
Unload Me
Frm_edit_User.Adodcl.Refresh
End Sub
Private Sub Command2_Click()
Load FormMain
FormMain.Show
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -