📄 frmmmxg.frm
字号:
VERSION 5.00
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Begin VB.Form FRMMMXG
BorderStyle = 1 'Fixed Single
Caption = "密码修改"
ClientHeight = 2580
ClientLeft = 45
ClientTop = 330
ClientWidth = 5730
Icon = "frmmmxg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2580
ScaleWidth = 5730
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Caption = "请输入新密码"
Height = 2535
Left = 3120
TabIndex = 7
Top = 0
Width = 2535
Begin CSCommand.Command Command3
Height = 375
Left = 1320
TabIndex = 15
Top = 2040
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmmmxg.frx":0442
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 CSCommand.Command Command2
Height = 375
Left = 240
TabIndex = 14
Top = 2040
Width = 855
_ExtentX = 1508
_ExtentY = 661
IconAlign = 0
Icon = "frmmmxg.frx":045E
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.TextBox Text4
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 10
Top = 960
Width = 855
End
Begin VB.TextBox Text3
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 8
Top = 240
Width = 855
End
Begin VB.Label Label5
Caption = "确认密码"
Height = 375
Left = 120
TabIndex = 11
Top = 960
Width = 855
End
Begin VB.Label Label4
Caption = "新密码"
Height = 375
Left = 120
TabIndex = 9
Top = 240
Width = 855
End
End
Begin VB.Frame Frame1
Caption = "请输入要修改的操作员资料"
Height = 2535
Left = 120
TabIndex = 0
Top = 0
Width = 2895
Begin CSCommand.Command Command4
Height = 375
Left = 1800
TabIndex = 13
Top = 2040
Width = 855
_ExtentX = 1508
_ExtentY = 661
IconAlign = 0
Icon = "frmmmxg.frx":047A
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 CSCommand.Command Command1
Height = 375
Left = 480
TabIndex = 12
Top = 2040
Width = 855
_ExtentX = 1508
_ExtentY = 661
IconAlign = 0
Icon = "frmmmxg.frx":0496
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.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 3
Top = 1560
Width = 975
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmmmxg.frx":04B2
Left = 1440
List = "frmmmxg.frx":04BC
TabIndex = 2
Top = 960
Width = 975
End
Begin VB.TextBox Text1
Height = 270
Left = 1440
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.Label Label3
Caption = "密码"
Height = 255
Left = 240
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.Label Label2
Caption = "权限"
Height = 255
Left = 240
TabIndex = 5
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "用户名"
Height = 375
Left = 240
TabIndex = 4
Top = 240
Width = 975
End
End
End
Attribute VB_Name = "FRMMMXG"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Set rec = New ADODB.Recordset
rec.Open "select * from 密码表 where 姓名='" & Text1.Text & "'and 操作权限='" & Combo1.Text & "'and 密码='" & Text2.Text & "'", gCnn, 3, 3
If rec.EOF = False Then
Text3.Enabled = True
Text4.Enabled = True
Command2.Enabled = True
rec.Close
Else
MsgBox "没有这个用户或者用户密码不正确"
End If
End Sub
Private Sub Command2_Click()
If Text3.Text = "" Or Text4.Text = "" Then
MsgBox "密码不能为空"
Text3.Text = ""
Text4.Text = ""
Exit Sub
End If
If Text3.Text <> Text4.Text Then
MsgBox "两次输入密码不相同,请重试"
Text3.Text = ""
Text4.Text = ""
Exit Sub
Else
Dim rec1 As ADODB.Recordset
Set rec1 = New ADODB.Recordset
rec1.Open "select * from 密码表 where 姓名='" & Text1.Text & "'and 操作权限='" & Combo1.Text & "'and 密码='" & Text2.Text & " '", gCnn, 3, 3
rec1("密码") = Text3.Text
rec1.Update
rec1.Close
MsgBox "密码已经成功修改"
End If
End Sub
Private Sub Command3_Click()
Unload Me
'frmlogin.Show 1
End Sub
Private Sub Command4_Click()
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
End Sub
Private Sub Form_Load()
Text3.Enabled = False
Text4.Enabled = False
Command2.Enabled = False
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Me.Hide
frmlogin.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -