📄 frmreset.frm
字号:
VERSION 5.00
Object = "{74848F95-A02A-4286-AF0C-A3C755E4A5B3}#1.0#0"; "actskn43.ocx"
Begin VB.Form frmreset
Caption = "修改密码"
ClientHeight = 3765
ClientLeft = 60
ClientTop = 450
ClientWidth = 4380
LinkTopic = "Form1"
ScaleHeight = 3765
ScaleWidth = 4380
StartUpPosition = 3 '窗口缺省
Begin VB.Frame frame
Height = 3375
Left = 120
TabIndex = 0
Top = 120
Width = 4215
Begin ACTIVESKINLibCtl.Skin sknreset
Left = 3960
OleObjectBlob = "frmreset.frx":0000
Top = 3000
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4
Height = 375
Left = 480
OleObjectBlob = "frmreset.frx":0234
TabIndex = 10
Top = 2040
Width = 1335
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 255
Left = 480
OleObjectBlob = "frmreset.frx":02A0
TabIndex = 9
Top = 1440
Width = 1335
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel2
Height = 375
Left = 480
OleObjectBlob = "frmreset.frx":030C
TabIndex = 8
Top = 960
Width = 1335
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel1
Height = 375
Left = 480
OleObjectBlob = "frmreset.frx":0378
TabIndex = 7
Top = 360
Width = 1335
End
Begin VB.CommandButton cmdcancel
Caption = "取 消"
Height = 495
Left = 2520
TabIndex = 6
Top = 2640
Width = 1215
End
Begin VB.CommandButton cmdok
Caption = "确 认"
Height = 495
Left = 480
TabIndex = 5
Top = 2640
Width = 1215
End
Begin VB.TextBox txtpassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 8
PasswordChar = "*"
TabIndex = 4
Top = 2040
Width = 1935
End
Begin VB.TextBox txtnewpassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 8
PasswordChar = "*"
TabIndex = 3
Top = 1440
Width = 1935
End
Begin VB.TextBox txtoldpassword
Height = 375
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 8
PasswordChar = "*"
TabIndex = 2
Top = 960
Width = 1935
End
Begin VB.TextBox txtusername
Height = 375
Left = 1800
TabIndex = 1
Top = 360
Width = 1935
End
End
End
Attribute VB_Name = "frmreset"
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() '修改用户密码
Dim rst As ADODB.Recordset
txtsql = "select * from tbLogin where cName= '" & Trim(txtusername.Text) & " '"
Set rst = ExecuteSQL(txtsql)
If Not rst.EOF Then
If Trim(rst.Fields(1)) = Trim(txtoldpassword.Text) Then
If Trim(txtnewpassword.Text) = Trim(txtpassword.Text) Then
rst("cPassword") = txtnewpassword.Text
rst.Update
txtusername.Text = ""
txtoldpassword.Text = ""
txtnewpassword.Text = ""
txtpassword.Text = ""
MsgBox "用户密码已修改!", vbOKOnly + 48, "宾馆管理系统"
Else
MsgBox "你输入的验证密码不对!"
Exit Sub
txtusername.Text = ""
txtoldpassword.Text = ""
txtnewpassword.Text = ""
txtpassword.Text = ""
End If
Else
MsgBox "你输入的原密码不对!"
Exit Sub
txtusername.Text = ""
txtoldpassword.Text = ""
txtnewpassword.Text = ""
txtpassword.Text = ""
End If
Else
MsgBox "没有此用户存在!"
txtusername.Text = ""
End If
rst.Close
End Sub
Private Sub Form_Load()
Call changeskin(Me, sknreset, strSkin)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -