📄 sysinfo.frm
字号:
Width = 1335
End
Begin VB.Label Label7
Caption = "ProcessorType:"
Height = 255
Left = 240
TabIndex = 14
Top = 1125
Width = 1215
End
Begin VB.Label Label6
Caption = "UserName:"
Height = 255
Left = 240
TabIndex = 12
Top = 765
Width = 855
End
Begin VB.Label Label5
Caption = "ComputerName:"
Height = 255
Left = 240
TabIndex = 10
Top = 405
Width = 1215
End
End
Begin VB.Frame Frame1
Caption = "Battery"
Height = 1935
Left = 120
TabIndex = 0
Top = 4440
Width = 3135
Begin VB.TextBox txtPercent
Height = 315
Left = 1080
TabIndex = 8
Top = 1080
Width = 1815
End
Begin VB.TextBox txtStatus
Height = 285
Left = 1080
TabIndex = 6
Top = 1440
Width = 1815
End
Begin VB.TextBox txtLifeTime
Height = 315
Left = 1080
TabIndex = 4
Top = 720
Width = 1815
End
Begin VB.TextBox txtACOnLine
Height = 315
Left = 1080
TabIndex = 2
Top = 360
Width = 1815
End
Begin VB.Label Label4
Caption = "Percent:"
Height = 255
Left = 240
TabIndex = 7
Top = 1125
Width = 855
End
Begin VB.Label Label3
Caption = "Status:"
Height = 255
Left = 240
TabIndex = 5
Top = 1485
Width = 855
End
Begin VB.Label Label2
Caption = "LifeTime:"
Height = 255
Left = 240
TabIndex = 3
Top = 760
Width = 855
End
Begin VB.Label Label1
Caption = "ACOnLine:"
Height = 255
Left = 240
TabIndex = 1
Top = 400
Width = 855
End
End
Begin SysInfo.SysInfo SysInfo
Left = 6000
Top = 120
MajorVer = 1
MinorVer = 0
End
Begin VB.Label Label21
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = $"SysInfo.frx":0012
ForeColor = &H00FF0000&
Height = 495
Left = 120
TabIndex = 45
Top = 6480
Width = 6375
End
Begin VB.Label Label11
Caption = "System Info OCX"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 400
size = 18
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
Left = 120
TabIndex = 18
Top = 120
Width = 4215
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Sub UpdateAll()
Drive_Change
txtComputerName = SysInfo.ComputerName
txtUserName = SysInfo.UserName
txtProcessorType = SysInfo.ProcessorType
txtProcessorUsage = SysInfo.ProcessorUsage
txtThreads = SysInfo.Threads
txtVirtualMachines = SysInfo.VirtualMachines
txtPlatform = SysInfo.Platform
txtOSVersion = SysInfo.OSMajorVersion & "." & SysInfo.OSMinorVersion
txtBuildNumber = SysInfo.BuildNumber
txtACOnLine = SysInfo.ACOnLine
txtLifeTime = SysInfo.BatteryLifeTime
txtPercent = SysInfo.BatteryPercent
txtStatus = SysInfo.BatteryStatus
txtPhysicalMemory = SysInfo.PhysicalMemory
txtFreePhysical = SysInfo.FreePhysicalMemory
txtVirtualMemory = SysInfo.VirtualMemory
txtSwapSize = SysInfo.SwapSize
End Sub
Private Sub comDevice_Click()
Select Case comDevice
Case "CDROM"
txtDevice = ""
I = 0
While SysInfo.CDROM(I) <> ""
txtDevice = txtDevice & SysInfo.CDROM(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Disk Drives"
txtDevice = ""
I = 0
While SysInfo.DiskDrive(I) <> ""
txtDevice = txtDevice & SysInfo.DiskDrive(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Display Adapters"
txtDevice = ""
I = 0
While SysInfo.Display(I) <> ""
txtDevice = txtDevice & SysInfo.Display(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Floppy disk controllers"
txtDevice = ""
I = 0
While SysInfo.FDC(I) <> ""
txtDevice = txtDevice & SysInfo.FDC(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Hard disk controllers"
txtDevice = ""
I = 0
While SysInfo.hDC(I) <> ""
txtDevice = txtDevice & SysInfo.hDC(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Keyboard"
txtDevice = ""
I = 0
While SysInfo.Keyboard(I) <> ""
txtDevice = txtDevice & SysInfo.Keyboard(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Modem"
txtDevice = ""
I = 0
While SysInfo.Modem(I) <> ""
txtDevice = txtDevice & SysInfo.Modem(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Monitor"
txtDevice = ""
I = 0
While SysInfo.Monitor(I) <> ""
txtDevice = txtDevice & SysInfo.Monitor(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Mouse"
txtDevice = ""
I = 0
While SysInfo.Mouse(I) <> ""
txtDevice = txtDevice & SysInfo.Mouse(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Network adapters"
txtDevice = ""
I = 0
While SysInfo.NetworkAdapter(I) <> ""
txtDevice = txtDevice & SysInfo.NetworkAdapter(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Ports (COM & LPT)"
txtDevice = ""
I = 0
While SysInfo.Port(I) <> ""
txtDevice = txtDevice & SysInfo.Port(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Sound, video and game controllers"
txtDevice = ""
I = 0
While SysInfo.Multimedia(I) <> ""
txtDevice = txtDevice & SysInfo.multimeda(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "System devices"
txtDevice = ""
I = 0
While SysInfo.SystemDevice(I) <> ""
txtDevice = txtDevice & SysInfo.SystemDevice(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Net clients"
txtDevice = ""
I = 0
While SysInfo.NetClient(I) <> ""
txtDevice = txtDevice & SysInfo.NetClient(I) & Chr(13) & Chr(10)
I = I + 1
Wend
Case "Protocols"
txtDevice = ""
I = 0
While SysInfo.Protocol(I) <> ""
txtDevice = txtDevice & SysInfo.Protocol(I) & Chr(13) & Chr(10)
I = I + 1
Wend
End Select
End Sub
Private Sub Drive_Change()
SysInfo.Disk = Left$(Drive, 2)
txtFileSystem = SysInfo.DiskFileSystem
txtDiskSpace = SysInfo.DiskSpace
txtFreeSpace = SysInfo.DiskFreeSpace
End Sub
Private Sub Form_Load()
UpdateAll
comDevice.AddItem "CDROM"
comDevice.AddItem "Disk Drives"
comDevice.AddItem "Display Adapters"
comDevice.AddItem "Floppy disk controllers"
comDevice.AddItem "Hard disk controllers"
comDevice.AddItem "Keyboard"
comDevice.AddItem "Modem"
comDevice.AddItem "Monitor"
comDevice.AddItem "Mouse"
comDevice.AddItem "Network adapters"
comDevice.AddItem "Ports (COM & LPT)"
comDevice.AddItem "Sound, video and game controllers"
comDevice.AddItem "System devices"
comDevice.AddItem "Net clients"
comDevice.AddItem "Protocols"
comDevice.ListIndex = 0
End Sub
Private Sub Timer_Timer()
UpdateAll
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -