📄 form8.frm
字号:
VERSION 5.00
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Begin VB.Form Form8
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "修改个人密码"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
Icon = "Form8.frx":0000
LinkTopic = "Form8"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.TextBox Text3
Appearance = 0 'Flat
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 2
Top = 2040
Width = 2175
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 1
Top = 1440
Width = 2175
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 0
Top = 840
Width = 2175
End
Begin CSCommand.Command Command2
Default = -1 'True
Height = 375
Left = 960
TabIndex = 6
Top = 2520
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "Form8.frx":84CA
Caption = "确认修改"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command Command3
Height = 375
Left = 2280
TabIndex = 7
Top = 2520
Width = 1095
_ExtentX = 1931
_ExtentY = 661
IconAlign = 0
Icon = "Form8.frx":84E6
Caption = "关闭窗口"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Image Image1
Height = 645
Left = 480
Picture = "Form8.frx":8502
Top = 0
Width = 3585
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "再次输入"
Height = 255
Index = 2
Left = 720
TabIndex = 5
Top = 2040
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "新 密 码"
Height = 255
Index = 1
Left = 720
TabIndex = 4
Top = 1440
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "原 密 码"
Height = 255
Index = 0
Left = 720
TabIndex = 3
Top = 840
Width = 855
End
End
Attribute VB_Name = "Form8"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command2_Click()
On Error Resume Next
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\GLNHHY.DLL;Persist Security Info=False"
Set rs = New ADODB.Recordset
If Text1.Text = "" Then
MDIForm1.StatusBar1.Panels(1).Text = "请输入原始密码."
Exit Sub
End If
If Text2.Text = "" Then
MDIForm1.StatusBar1.Panels(1).Text = "请输入新密码."
Exit Sub
End If
If Text2.Text <> Text3.Text Then
MDIForm1.StatusBar1.Panels(1).Text = "两次新密码输入不一致."
Exit Sub
End If
SQL = "select * from admins where users='" & users & "'"
rs.Open SQL, conn, 1, 3
If rs("pass") = Text1.Text Then
rs("pass") = Text2.Text
rs.Update
If Err.Number = 0 Then
MDIForm1.StatusBar1.Panels(1).Text = "密码修改成功."
Else
MDIForm1.StatusBar1.Panels(1).Text = "出现错误:" & Err.Description
End If
Else
MDIForm1.StatusBar1.Panels(1).Text = "原始密码错误."
End If
rs.Close
End Sub
Private Sub Command3_Click()
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -