📄 dialog1.frm
字号:
VERSION 5.00
Begin VB.Form Dialog1
BorderStyle = 3 'Fixed Dialog
Caption = "用户管理"
ClientHeight = 4740
ClientLeft = 3540
ClientTop = 3675
ClientWidth = 7230
Icon = "Dialog1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 4740
ScaleWidth = 7230
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command4
Caption = "退出管理"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5040
TabIndex = 6
Top = 3960
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "删除用户"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3000
TabIndex = 5
Top = 3960
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "添加用户"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 4
Top = 3960
Width = 1455
End
Begin VB.Frame Frame1
Caption = "管理员组"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 2340
TabIndex = 0
Top = 360
Width = 2655
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "Dialog1.frx":030A
Left = 240
List = "Dialog1.frx":0311
Style = 2 'Dropdown List
TabIndex = 2
Top = 360
Width = 2055
End
End
Begin VB.Frame Frame2
Caption = "操作员组"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 4080
TabIndex = 1
Top = 360
Visible = 0 'False
Width = 2535
Begin VB.ComboBox Combo2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "Dialog1.frx":0319
Left = 240
List = "Dialog1.frx":031B
Style = 2 'Dropdown List
TabIndex = 3
Top = 360
Visible = 0 'False
Width = 1935
End
End
End
Attribute VB_Name = "Dialog1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub OKButton_Click()
End Sub
Private Sub Command1_Click() '添加用户
Dialog2.Show 1
End Sub
Private Sub Command2_Click() '删除用户
Dim i As Integer
Dim a As Integer
Dim doo As Boolean
doo = False
If Combo1.Text <> "" Then
doo = True
a = Combo1.ListIndex
Combo1.RemoveItem a
For i = a To 8
mainuser(i) = mainuser(i + 1)
Next i
End If
If Combo2.Text <> "" Then
doo = True
a = Combo2.ListIndex
Combo2.RemoveItem a
For i = a To 8
ptuser(i) = ptuser(i + 1)
Next i
End If
If doo = True Then
Open App.Path + "\abc.pss" For Random As #1
For i = 0 To 8
Put #1, , mainuser(i)
Put #1, , ptuser(i)
Next i
Close #1
End If
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
'SetTopMostWindow hwnd, True
Open App.Path + "\abc.pss" For Random As #1
For i = 0 To 8
Get #1, , mainuser(i)
Get #1, , ptuser(i)
Next i
Close #1
End Sub
Private Sub Form_Paint()
Dim i As Integer
For i = 0 To 8
Combo1.List(i) = mainuser(i).username '管理员组列表
Combo2.List(i) = ptuser(i).username '操作员组列表
Next i
Combo1.List(9) = "恒力"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -