📄 frmgraphlook.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmGraphLook
BorderStyle = 3 'Fixed Dialog
Caption = "机房状态监控(列表)"
ClientHeight = 7140
ClientLeft = 45
ClientTop = 330
ClientWidth = 10665
Icon = "frmGraphLook.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 7140
ScaleWidth = 10665
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin MSComctlLib.ListView lvwComputer
Height = 6855
Left = 240
TabIndex = 0
Top = 120
Width = 10215
_ExtentX = 18018
_ExtentY = 12091
LabelWrap = -1 'True
HideSelection = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
HotTracking = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
End
Attribute VB_Name = "frmGraphLook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rsComputer As Recordset
Dim rsCardholderTemp As Recordset
Dim lItem As ListItem
Private Sub Form_Load()
lvwComputer.View = lvwReport '配置lvwComputer控件
lvwComputer.Sorted = True
lvwComputer.Visible = True
lvwComputer.ColumnHeaders.Add , , "计算机ID", lvwComputer.Width / 10 '配置lvwInstitute控件
lvwComputer.ColumnHeaders.Add , , "行号", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "列号", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "状态", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "卡号", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "姓名", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "类别", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "上机方式", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "上机时间", lvwComputer.Width / 10
lvwComputer.ColumnHeaders.Add , , "计算机描述", lvwComputer.Width / 10
Set rsComputer = New Recordset
rsComputer.Open "select * from TbComputer ", Modmain.conn, 3, 2
While Not rsComputer.EOF
Set rsCardholderTemp = New Recordset
rsCardholderTemp.Open "select * from TbCardholderTemp where CPT_ID='" & rsComputer.Fields!CPT_ID & "'", Modmain.conn, 3, 2
Set lItem = lvwComputer.ListItems.Add
lItem.Text = rsComputer.Fields!CPT_ID
lItem.SubItems(1) = rsComputer.Fields!row
lItem.SubItems(2) = rsComputer.Fields!Tier
lItem.SubItems(3) = rsComputer.Fields!State
If rsComputer.Fields!State = "使用" Then
lItem.SubItems(4) = rsCardholderTemp.Fields!CH_ID
lItem.SubItems(5) = rsCardholderTemp.Fields!CH_Name
lItem.SubItems(6) = rsCardholderTemp.Fields!ST_Name
lItem.SubItems(7) = rsCardholderTemp.Fields!Start_Time
lItem.SubItems(8) = rsCardholderTemp.Fields!Fashion
If rsCardholderTemp.Fields!Fashion <> "" Then
lItem.SubItems(9) = rsCardholderTemp.Fields!CH_Memo
End If
End If
rsComputer.MoveNext
Wend
frmHourStatistic.AddLog ("L30") '记入操作日志
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -