📄 mmxg.frm
字号:
VERSION 5.00
Begin VB.Form xgmm
Caption = "密码修改"
ClientHeight = 3210
ClientLeft = 60
ClientTop = 450
ClientWidth = 4215
LinkTopic = "Form1"
ScaleHeight = 3210
ScaleWidth = 4215
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame4
Height = 3255
Left = 0
TabIndex = 0
Top = 0
Width = 4215
Begin VB.CommandButton Command1
Caption = "修 改"
Height = 495
Left = 960
TabIndex = 5
Top = 2160
Width = 855
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Index = 2
Left = 2160
PasswordChar = "*"
TabIndex = 4
Top = 1440
Width = 1215
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Index = 1
Left = 2160
PasswordChar = "*"
TabIndex = 3
Top = 1020
Width = 1215
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Index = 0
Left = 2160
PasswordChar = "*"
TabIndex = 2
Top = 600
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "取消"
Height = 495
Left = 2400
TabIndex = 1
Top = 2160
Width = 855
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "确认新密码 :"
Height = 180
Left = 840
TabIndex = 8
Top = 1485
Width = 1170
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "用户新密码 : "
Height = 180
Left = 840
TabIndex = 7
Top = 1035
Width = 1260
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "用户旧密码 :"
Height = 180
Left = 840
TabIndex = 6
Top = 600
Width = 1170
End
End
End
Attribute VB_Name = "xgmm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim user As ADODB.Recordset
Dim pass As String
Private Sub Command1_Click()
If Text1(0).Text = "" Then
MsgBox "请输入旧密码", 0, "系统提示"
Text1(0).SetFocus
Exit Sub
End If
Set user = Ex_Sql("select user_id,user_pass from user_info where user_id='" & Module1.name & "'")
If Not user.EOF Then
pass = user.Fields(1)
If pass <> Text1(0).Text Then
MsgBox "旧密码输入不正确!", 0, "系统提示"
Text1(1).SetFocus
Exit Sub
End If
End If
If Text1(1).Text = "" Then
MsgBox "请输入新密码", 0, "系统提示"
Text1(1).SetFocus
Exit Sub
End If
If Text1(2).Text <> Text1(1).Text Then
MsgBox "密码不一致,请重新输入", 0, "系统提示"
Text1(2).SetFocus
Exit Sub
End If
Ex_Sql "update User_info set User_Pass = '" & Trim(Text1(1).Text) & "' where User_Id = '" & Module1.name & "'"
MsgBox "修改成功!", 0, "系统提示"
Unload Me
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
MainMdi.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -