📄 frmmmsz.frm
字号:
VERSION 5.00
Begin VB.Form FrmMmsz
Caption = "密码设置"
ClientHeight = 2940
ClientLeft = 135
ClientTop = 1350
ClientWidth = 3900
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 3900
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消(&C)"
Height = 375
Left = 2040
TabIndex = 8
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确认(&O)"
Height = 375
Left = 720
TabIndex = 7
Top = 2280
Width = 1095
End
Begin VB.Frame Frame1
Caption = "密码设置"
Height = 1815
Left = 240
TabIndex = 0
Top = 240
Width = 3375
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 6
Top = 1280
Width = 1935
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 4
Top = 800
Width = 1935
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "FrmMmsz.frx":0000
Left = 1200
List = "FrmMmsz.frx":000D
Style = 2 'Dropdown List
TabIndex = 2
Top = 320
Width = 1935
End
Begin VB.Label Label3
Caption = "密码确认:"
Height = 255
Left = 240
TabIndex = 5
Top = 1320
Width = 975
End
Begin VB.Label Label2
Caption = "密码:"
Height = 255
Left = 240
TabIndex = 3
Top = 840
Width = 855
End
Begin VB.Label Label1
Caption = "用户类型:"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 1215
End
End
End
Attribute VB_Name = "FrmMmsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim strExec As String
If Text1.Text = Text2.Text Then
If Combo1.Text = "" Or Text2.Text = "" Or Text1.Text = "" Then
MsgBox "输入信息不全!", vbCritical, "错误信息"
Exit Sub
End If
If MsgBox("您确认要设置新的" & Combo1.Text & "密码吗?", vbOKCancel, "系统信息") = vbOK Then
Select Case Combo1.Text
Case "系统管理员"
strExec = "Update YHGLB Set yhmc='" & Combo1.Text & "',yhmm='" & Text1.Text & "' Where yhjb=1"
objCon.Execute strExec
Case "数据录入员"
strExec = "Update YHGLB Set yhmc='" & Combo1.Text & "',yhmm='" & Text1.Text & "' Where yhjb=2"
objCon.Execute strExec
Case "查询人员"
strExec = "Update YHGLB Set yhmc='" & Combo1.Text & "',yhmm='" & Text1.Text & "' Where yhjb=3"
objCon.Execute strExec
End Select
End If
Else
MsgBox "输入的密码互不相同!", vbCritical, "错误信息"
Text1.SetFocus
End If
End Sub
Private Sub Form_Load()
Combo1.Clear
If numUserType = 1 Then
Combo1.AddItem ("系统管理员")
ElseIf numUserType = 2 Then
Combo1.AddItem ("数据录入员")
Else
Combo1.AddItem ("查询人员")
End If
End Sub
Private Sub FOrm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
FrmMain.Enabled = True
End Sub
Private Sub Command2_Click()
FrmMain.Enabled = True
Unload FrmMmsz
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -