📄 frmyhmmxg.frm
字号:
VERSION 5.00
Begin VB.Form frmyhmmxg
BorderStyle = 1 'Fixed Single
Caption = "用户密码修改"
ClientHeight = 3780
ClientLeft = 45
ClientTop = 435
ClientWidth = 4005
Icon = "frmyhmmxg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3780
ScaleWidth = 4005
Begin VB.CommandButton cmdok
Caption = "确 认"
Default = -1 'True
Height = 375
Left = 480
TabIndex = 5
Top = 3120
Width = 1095
End
Begin VB.CommandButton cmdexit
Cancel = -1 'True
Caption = "退 出"
Height = 375
Left = 2400
TabIndex = 7
Top = 3120
Width = 1095
End
Begin VB.TextBox txt确认密码
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 3
Top = 2415
Width = 2055
End
Begin VB.TextBox txt密码2
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 2
Top = 1770
Width = 2055
End
Begin VB.TextBox txt密码1
Height = 390
IMEMode = 3 'DISABLE
Left = 1470
PasswordChar = "*"
TabIndex = 1
Top = 1140
Width = 2055
End
Begin VB.TextBox txt用户名
BackColor = &H8000000F&
Enabled = 0 'False
Height = 390
Left = 1470
TabIndex = 0
Text = "admin"
Top = 495
Width = 2055
End
Begin VB.PictureBox Picbg1
Appearance = 0 'Flat
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 1440
Left = 3960
Picture = "frmyhmmxg.frx":19862
ScaleHeight = 1440
ScaleWidth = 1440
TabIndex = 8
Top = 2040
Width = 1440
End
Begin VB.Label 用户名
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用 户 名:"
Height = 180
Left = 480
TabIndex = 10
Top = 600
Width = 915
End
Begin VB.Label 原密码
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "原 密 码:"
Height = 180
Left = 480
TabIndex = 9
Top = 1245
Width = 915
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "确认密码:"
Height = 180
Left = 465
TabIndex = 6
Top = 2520
Width = 915
End
Begin VB.Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 码:"
Height = 180
Left = 465
TabIndex = 4
Top = 1875
Width = 915
End
End
Attribute VB_Name = "frmyhmmxg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdok_Click()
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "select 密码 from yhxxb where 用户名 = '" & Trim(txt用户名.Text) & "'"
Set rs = TransactSQL(sql)
If Trim(txt密码1.Text) = rs.Fields(0) Then
If Trim(txt密码2.Text) <> Trim(txt确认密码.Text) Then
MsgBox "密码与确认密码不一致!", vbOKOnly + vbExclamation, "错误"
txt密码2.SetFocus
txt密码2.Text = ""
txt确认密码.Text = ""
ElseIf Len(Trim(txt密码2.Text)) < 6 Then
MsgBox "密码至少有6位", vbOKOnly + vbExclamation, "错误"
txt密码2.SetFocus
txt密码2.Text = ""
txt确认密码.Text = ""
Else
rs.Fields(0) = txt密码2.Text
rs.Update
rs.Close
MsgBox "密码修改成功!", vbOKOnly + vbExclamation
Unload Me
End If
Else
MsgBox "原密码不正确!", vbOKOnly + vbExclamation, "错误"
txt密码1.Text = ""
txt密码1.SetFocus
End If
End Sub
Private Sub Form_Load()
Call fullpic(Me, Picbg1)
Me.Left = (frmmain.ScaleWidth - Me.Width) / 2
Me.Top = (frmmain.ScaleHeight - Me.Height) / 2
txt用户名.Text = user
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -