发布网友 发布时间:2022-04-24 06:08
共1个回答
热心网友 时间:2023-10-06 22:48
这段代码能获得显示器型号 不明白你说的显示器序列号是什么 刚看了设备管理器上也没这项
Private Sub Command1_Click()
Dim s, System, item
Set System = GetObject("winmgmts:").InstancesOf("Win32_DesktopMonitor")
For Each item In System
s = s & "caption:" & item.Caption & vbCrLf
s = s & "Description:" & item.Description & vbCrLf
s = s & "ScreenWidth:" & item.ScreenWidth & vbCrLf
s = s & "ScreenHeight:" & item.ScreenHeight & vbCrLf
s = s & "MonitorManufacturer:" & item.MonitorManufacturer & vbCrLf
Next
Print s
End Sub