📄 frmmodifyuserinfo.frm
字号:
VERSION 5.00
Begin VB.Form frmModifyuserinfo
BorderStyle = 1 'Fixed Single
Caption = "修改密码"
ClientHeight = 3075
ClientLeft = 30
ClientTop = 330
ClientWidth = 3750
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3075
ScaleWidth = 3750
Begin VB.TextBox Text1
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Index = 0
Left = 1920
PasswordChar = "*"
TabIndex = 6
Top = 240
Width = 1572
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
IMEMode = 3 'DISABLE
Index = 1
Left = 1920
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 1572
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Index = 2
Left = 1920
PasswordChar = "*"
TabIndex = 2
Top = 1440
Width = 1572
End
Begin VB.CommandButton cmdOK
Caption = "确认"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 360
TabIndex = 1
Top = 2280
Width = 1215
End
Begin VB.CommandButton cmdCancel
Caption = "取消"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 1920
TabIndex = 0
Top = 2280
Width = 1215
End
Begin VB.Label Label1
Caption = "请输入原密码:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 7
Top = 360
Width = 1665
End
Begin VB.Label Label2
Caption = "请输入新密码:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 5
Top = 960
Width = 1665
End
Begin VB.Label Label3
Caption = "请确认新密码:"
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 4
Top = 1560
Width = 1635
End
End
Attribute VB_Name = "frmModifyuserinfo"
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 cmdOK_Click()
Dim txtSQL, MsgText As String
Dim mrc As ADODB.Recordset
mrc.Open
If Trim(Text1(0).Text) <> PWD Then
'判断是否是合法的用户
MsgBox "原密码输入不正确!", vbOKOnly + vbExclamation, "警告"
Text1(0).SetFocus
Text1(0).Text = ""
Exit Sub
End If
If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then
'判断输入的新密码是否正确
MsgBox "新密码输入不正确!", vbOKOnly + vbExclamation, "警告"
Text1(1).SetFocus
Text1(1).Text = ""
Else
txtSQL = "update Manager set pwd='" & Text1(1).Text & "' where username = '" & UserName & "'"
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.Fields(1) = Text1(1).Text
mrc.Update
mrc.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
Me.Hide
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -