📄 frmmodpwd.frm
字号:
VERSION 5.00
Begin VB.Form Frmmodpwd
BorderStyle = 1 'Fixed Single
Caption = "修改密码"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "确 定"
Height = 495
Left = 1560
TabIndex = 4
Top = 2280
Width = 1215
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 1
Top = 1440
Width = 2655
End
Begin VB.TextBox Text1
Height = 495
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 0
Top = 720
Width = 2655
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "请确认新密码"
Height = 180
Left = 120
TabIndex = 3
Top = 1560
Width = 1080
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "请输入新密码"
Height = 180
Left = 120
TabIndex = 2
Top = 840
Width = 1080
End
End
Attribute VB_Name = "Frmmodpwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
pass1 = Trim(Text1.Text)
pass2 = Trim(Text2.Text)
If pass1 = pass2 Then
Dim mrc As ADODB.Recordset
txtsql = "select username,password from use where username='" & username & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF Then
MsgBox "此用户不存在"
Else
mrc.Fields(1) = pass1
mrc.Update
MsgBox "修改成功", vbOKOnly, "密码"
End If
Unload Me
Else
If MsgBox("两次密码不一致", vbRetryCancel, "错误") = vbCancel Then
Unload Me
Else
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -