📄 frmmodipassword.frm
字号:
VERSION 5.00
Begin VB.Form frmmodipassword
BorderStyle = 1 'Fixed Single
Caption = "修改密码"
ClientHeight = 3195
ClientLeft = 4785
ClientTop = 2790
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.CommandButton Cmdcanel
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2400
TabIndex = 7
Top = 2280
Width = 1455
End
Begin VB.CommandButton CmdOK
Caption = "修改"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 600
TabIndex = 6
Top = 2280
Width = 1335
End
Begin VB.TextBox Txtnewp2
Height = 390
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 5
Top = 1560
Width = 2055
End
Begin VB.TextBox Txtnewp1
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 4
Top = 960
Width = 2055
End
Begin VB.TextBox txtoldp
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 3
Top = 360
Width = 2055
End
Begin VB.Label Label3
Caption = "请确认新密码"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 2
Top = 1680
Width = 1215
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "请输入新密码"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 1
Top = 1080
Width = 1215
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "请输入旧密码"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 0
Top = 480
Width = 1335
End
End
Attribute VB_Name = "frmmodipassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcanel_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
Dim txtsql As String
Dim msgtext As String
Dim mrc As ADODB.Recordset
If Trim(txtoldp.Text) <> password Then
MsgBox "对不起,你输入的旧密码不正确!", vbOKOnly + vbExclamation, "警告"
txtoldp.SetFocus
txtoldp.Text = ""
Txtnewp1.Text = ""
Txtnewp2.Text = ""
Else
If Trim(Txtnewp1.Text) = "" Then
MsgBox "密码不能为空!", vbOKOnly + vbExclamation, "警告"
txtoldp.SetFocus
txtoldp.Text = ""
Txtnewp1.Text = ""
Txtnewp2.Text = ""
Else
If Trim(Txtnewp1.Text) <> Trim(Txtnewp2.Text) Then
MsgBox "两次新密码输入不一致", vbOKOnly + vbExclamation, "警告"
txtoldp.SetFocus
txtoldp.Text = ""
Txtnewp1.Text = ""
Txtnewp2.Text = ""
Else
txtsql = "select * from users where user_id='" & username & "'"
Set mrc = ExecuteSQL(txtsql, msgtext)
mrc.Fields(1) = Trim(Txtnewp1.Text)
mrc.Update
mrc.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, "修改密码"
Me.Hide
End If
End If
End If
End Sub
Private Sub Form_Load()
Me.Left = 4740
Me.Top = 2460
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -