📄 frmchangpword.frm
字号:
VERSION 5.00
Begin VB.Form FrmChangPWord
BackColor = &H00C0E0FF&
Caption = "修改密码"
ClientHeight = 2805
ClientLeft = 60
ClientTop = 345
ClientWidth = 4230
Icon = "frmChangPWord.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 2805
ScaleWidth = 4230
Begin VB.TextBox TxtPS
BackColor = &H0080C0FF&
ForeColor = &H00FF0000&
Height = 345
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 2
Top = 1080
Width = 2325
End
Begin VB.TextBox txtPassword
BackColor = &H0080C0FF&
ForeColor = &H00FF0000&
Height = 345
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 1
Top = 600
Width = 2325
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 390
Left = 3120
TabIndex = 4
Top = 1560
Width = 900
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
Height = 390
Left = 1920
TabIndex = 3
Top = 1560
Width = 900
End
Begin VB.TextBox txtUserName
BackColor = &H0080C0FF&
ForeColor = &H00FF0000&
Height = 345
Left = 1800
TabIndex = 0
Top = 120
Width = 2325
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "请再输入一遍(&P):"
ForeColor = &H00FF0000&
Height = 270
Index = 2
Left = 120
TabIndex = 8
Top = 1200
Width = 1665
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "请输入新密码(&P):"
ForeColor = &H00FF0000&
Height = 270
Index = 1
Left = 120
TabIndex = 7
Top = 720
Width = 1665
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用户名称(&U):"
ForeColor = &H00FF0000&
Height = 270
Index = 0
Left = 480
TabIndex = 6
Top = 240
Width = 1080
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请你记住你的新密码!"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 960
TabIndex = 5
Top = 2280
Width = 3735
End
Begin VB.Image Image1
Height = 480
Left = 240
Picture = "frmChangPWord.frx":08CA
Top = 2160
Width = 480
End
End
Attribute VB_Name = "FrmChangPWord"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If Trim(txtUserName.Text) = UserName Then
If Trim(Me.txtPassword.Text) = Trim(Me.TxtPS.Text) Then
Dim str As String
Dim RsPW As New ADODB.Recordset
str = "select * from 密码表 where UserName = " & "'" & UserName & "'"
RsPW.Open str, cn, adOpenDynamic, adLockOptimistic
Debug.Print RsPW.RecordCount
RsPW("Password") = Trim(txtPassword.Text)
RsPW.Update
RsPW.Close
MsgBox "修改成功,请记住你的新密码!"
Unload Me
Else
MsgBox "你两次输入的密码不一样!修改密码不能执行!"
End If
Else
MsgBox "你输入用户名,与登陆时的用户名不一致,修改不能执行!"
End If
End Sub
Private Sub Form_Load()
Me.Width = 4350
Me.Height = 3210
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -