📄 frmedituser.frm
字号:
VERSION 5.00
Begin VB.Form frmEditUser
Caption = "管理员信息编辑窗口"
ClientHeight = 3330
ClientLeft = 60
ClientTop = 345
ClientWidth = 5685
Icon = "frmEditUser.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3330
ScaleWidth = 5685
Begin VB.TextBox txtConfirm
Height = 300
IMEMode = 3 'DISABLE
Left = 4215
PasswordChar = "*"
TabIndex = 4
Top = 1460
Width = 1215
End
Begin VB.TextBox txtUserName
Height = 300
Left = 1455
TabIndex = 1
Top = 860
Width = 1215
End
Begin VB.ComboBox cmbPermit
Height = 300
Left = 4215
TabIndex = 3
Text = "cmbPermit"
Top = 260
Width = 1215
End
Begin VB.CommandButton cmdAdd
Caption = "添加"
Height = 375
Left = 360
Style = 1 'Graphical
TabIndex = 9
Top = 2600
Width = 735
End
Begin VB.CommandButton cmdCancel
Caption = "放弃"
Height = 375
Left = 1200
Style = 1 'Graphical
TabIndex = 10
Top = 2600
Width = 735
End
Begin VB.CommandButton cmdDel
Caption = "删除"
Height = 375
Left = 2040
Style = 1 'Graphical
TabIndex = 11
Top = 2600
Width = 735
End
Begin VB.CommandButton cmdModify
Caption = "修改"
Height = 375
Left = 2880
Style = 1 'Graphical
TabIndex = 12
Top = 2600
Width = 735
End
Begin VB.CommandButton cmdExit
Caption = "退出"
Height = 375
Left = 4560
Style = 1 'Graphical
TabIndex = 14
Top = 2600
Width = 735
End
Begin VB.CommandButton cmdFirst
Caption = "<<"
Height = 255
Left = 600
Style = 1 'Graphical
TabIndex = 5
Top = 2100
Width = 550
End
Begin VB.CommandButton cmdPrevious
Caption = "<"
Height = 255
Left = 1880
Style = 1 'Graphical
TabIndex = 6
Top = 2100
Width = 550
End
Begin VB.CommandButton cmdNext
Caption = ">"
Height = 255
Left = 3160
Style = 1 'Graphical
TabIndex = 7
Top = 2100
Width = 550
End
Begin VB.CommandButton cmdLast
Caption = ">>"
Height = 255
Left = 4440
Style = 1 'Graphical
TabIndex = 8
Top = 2100
Width = 550
End
Begin VB.CommandButton cmdSave
Caption = "确定"
Height = 375
Left = 3720
Style = 1 'Graphical
TabIndex = 13
Top = 2600
Width = 735
End
Begin VB.TextBox txtPassword
Height = 300
IMEMode = 3 'DISABLE
Left = 1455
PasswordChar = "*"
TabIndex = 2
Top = 1460
Width = 1215
End
Begin VB.ComboBox cmbCode
Height = 300
Left = 1455
TabIndex = 0
Text = "cmbCode"
Top = 260
Width = 1215
End
Begin VB.Label lblPermit
Caption = "权限类型"
Height = 375
Left = 3015
TabIndex = 19
Top = 300
Width = 975
End
Begin VB.Label lblConfirm
Caption = "密码确认"
Height = 375
Left = 3015
TabIndex = 18
Top = 1500
Width = 975
End
Begin VB.Label lblPassword
Caption = "密 码"
Height = 375
Left = 200
TabIndex = 17
Top = 1500
Width = 975
End
Begin VB.Label lblUserName
Caption = "用户名"
Height = 375
Left = 200
TabIndex = 16
Top = 900
Width = 975
End
Begin VB.Label lblCode
Caption = "中心代码"
Height = 375
Left = 200
TabIndex = 15
Top = 300
Width = 975
End
End
Attribute VB_Name = "frmEditUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdAdd_Click()
cmdFlag = 1
Dim ctlcontrol As Control
'禁用除 添加记录 放弃添加 确定 退出 以外的所有按钮控件
For Each ctlcontrol In Controls
If TypeOf ctlcontrol Is CommandButton Then
If ctlcontrol.Name = "cmdAdd" Or ctlcontrol.Name = "cmdCancel" Or ctlcontrol.Name = "cmdSave" Or ctlcontrol.Name = "cmdExit" Then
ctlcontrol.Enabled = True
Else
ctlcontrol.Enabled = False
End If
End If
Next
'清除所有控件的文本显示,DisplayRefresh子程 见本窗体
DisplayRefresh
cmdCancel.SetFocus
End Sub
Private Sub cmdCancel_Click()
cmdFlag = 0
'消除控件的禁用,ControlEnabled子程 见本窗体
ControlEnabled
'清除所有控件的文本显示,DisplayRefresh子程 见本窗体
DisplayRefresh
End Sub
Private Sub cmdDel_Click()
cmdFlag = 2
'禁用 添加记录 修改记录 按钮控件
Dim ctlcontrol As Control
For Each ctlcontrol In Controls
If TypeOf ctlcontrol Is CommandButton Then
If ctlcontrol.Name = "cmdAdd" Or ctlcontrol.Name = "cmdModify" Then
ctlcontrol.Enabled = False
End If
End If
Next
'禁用控件文本框和组合框,ControlDisabled子程 见本窗体
ControlDisabled
cmdCancel.SetFocus
End Sub
Private Sub cmdExit_Click()
'关闭记录集,RsClose函数 见模块MdlConnection
RsClose rs
'关闭窗体
Unload Me
End Sub
Private Sub cmdFirst_Click()
rs.MoveFirst
'显示当前记录内容,Display子程 见本窗体
Display
End Sub
Private Sub cmdLast_Click()
rs.MoveLast
'显示当前记录内容,Display子程 见本窗体
Display
End Sub
Private Sub cmdModify_Click()
cmdFlag = 3
'禁用 添加记录 删除记录 按钮控件
Dim ctlcontrol As Control
For Each ctlcontrol In Controls
If TypeOf ctlcontrol Is CommandButton Then
If ctlcontrol.Name = "cmdAdd" Or ctlcontrol.Name = "cmdDel" Then
ctlcontrol.Enabled = False
End If
End If
Next
cmbCode.Enabled = False
txtUserName.Enabled = False
cmdCancel.SetFocus
End Sub
Private Sub cmdNext_Click()
With rs
.MoveNext
If .EOF Then .MoveLast
End With
'显示当前记录内容,Display子程 见本窗体
Display
End Sub
Private Sub cmdPrevious_Click()
With rs
.MovePrevious
If .BOF Then .MoveFirst
End With
'显示当前记录内容,Display子程 见本窗体
Display
End Sub
Private Sub cmdSave_Click()
Dim ctlcontrol As Control
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -