📄 modify.frm
字号:
VERSION 5.00
Begin VB.Form modify
Caption = "密码修改"
ClientHeight = 2610
ClientLeft = 60
ClientTop = 450
ClientWidth = 3345
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2610
ScaleWidth = 3345
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2040
TabIndex = 7
Top = 1920
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 480
TabIndex = 6
Top = 1920
Width = 855
End
Begin VB.TextBox Text3
Height = 270
Left = 1680
TabIndex = 5
Top = 1320
Width = 1455
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 4
Top = 720
Width = 1455
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 3
Top = 240
Width = 1455
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "密码确认"
Height = 180
Left = 360
TabIndex = 2
Top = 1410
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "新密码"
Height = 180
Left = 360
TabIndex = 1
Top = 810
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "旧密码"
Height = 180
Left = 360
TabIndex = 0
Top = 330
Width = 720
End
End
Attribute VB_Name = "modify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
If Text2 = Text3 Then
txtsql = "select * from 权限表 where 用户名 = '" & main.Label5.Caption & "'"
Set mrc = exesql(txtsql)
If Text1 = mrc.Fields("密码") Then
mrc.Fields("密码") = Text2
MsgBox "密码修改成功!", vbOKOnly
Else
MsgBox "你的旧密码不正确!", vbOKOnly
Text1.SetFocus
End If
Else
MsgBox "你两次的密码不一致!", vbOKOnly
Text1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -