📄 pwd_s.frm
字号:
VERSION 5.00
Begin VB.Form pwd_s
BackColor = &H80000013&
Caption = "修改密码"
ClientHeight = 2745
ClientLeft = 60
ClientTop = 465
ClientWidth = 5460
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2745
ScaleWidth = 5460
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2760
TabIndex = 5
Top = 1800
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 1080
TabIndex = 4
Top = 1800
Width = 1215
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 2160
PasswordChar = "*"
TabIndex = 3
Top = 960
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 2160
PasswordChar = "*"
TabIndex = 2
Top = 360
Width = 2295
End
Begin VB.Label Label2
BackColor = &H80000013&
Caption = "请确认新密码:"
Height = 255
Left = 600
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.Label Label1
BackColor = &H80000013&
Caption = "请输入新密码:"
Height = 255
Left = 600
TabIndex = 0
Top = 360
Width = 1335
End
End
Attribute VB_Name = "pwd_s"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim msgText As String
Dim txtSQL As String
Dim mrc As ADODB.Recordset
If Trim(Text1.Text) = "" Then
MsgBox "密码不可以为空", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus
Exit Sub
ElseIf Trim(Text1.Text) <> Trim(Text2.Text) Then
MsgBox "两次密码输入的不一样", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus
Text1.Text = ""
Exit Sub
Else
txtSQL = "select * from g_user where uid='" & UserName & "'"
Set mrc = ExecuteSQL(txtSQL, msgText)
mrc.Fields(1) = Text1.Text
mrc.Update
mrc.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, "修改密码"
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -