求人!!!VB.net 获取硬件信息!!!

大家可以帮我一个问题吗???
怎样用VB.NET获取显卡和主板驱动信息啊?????高分加

显卡:
Private Sub get_disp_info()
Dim i As Integer
Dim info(50) As String
Dim name(50) As String
Dim j As Integer
name(0) = "Name"
name(1) = "Caption"
name(2) = "ColorPlanes"
name(3) = "Description"
name(4) = "RefreshRate"
name(5) = "SettingID"
name(6) = "VideoMode"
name(7) = "VerticalResolution"
name(8) = "SystemPaletteEntries"
name(9) = "ReservedSystemPaletteEntries"
name(10) = "BitsPerPixel"
name(11) = "DeviceEntriesInAColorTable"
name(12) = "DeviceSpecificPens"
name(13) = "HorizontalResolution"
Dim opt As New System.Management.ManagementObjectSearcher("Select * from Win32_DisplayControllerConfiguration")
For Each obj2 As System.Management.ManagementObject In opt.Get
For j = 0 To 13
Try
info(j) = obj2(name(j))
Catch ex As Exception
info(j) = ""
End Try
Next
For i = 0 To 14
Dim newitem1 As New ListViewItem(name(i))
newitem1.SubItems.Add(info(i))
List_disp.Items.Add(newitem1)
Next
Next
End Sub

主板驱动信息:

Private Sub get_bois_info()
Dim i As Integer
Dim info(50) As String
Dim name(50) As String
Dim j As Integer
name(0) = "Name"
name(1) = "Caption"
name(2) = "SerialNumber"
name(3) = "Manufacturer"
name(4) = "Description"
name(5) = "PrimaryBIOS"
name(6) = "Version"
name(7) = "Status"
name(8) = "BuildNumber"
name(9) = "CodeSet"
name(10) = "CurrentLanguage"
name(11) = "IdentificationCode"
name(12) = "InstallableLanguages"
name(13) = "InstallDate"
name(14) = "LanguageEdition"
name(15) = "OtherTargetOS"
name(16) = "ReleaseDate"
name(17) = "SMBIOSBIOSVersion"
name(18) = "SMBIOSMajorVersion"
name(19) = "SMBIOSMinorVersion"
name(20) = "SMBIOSPresent"
name(21) = "SoftwareElementID"
name(22) = "SoftwareElementState"
name(23) = "TargetOperatingSystem"
name(24) = "ListOfLanguages"
name(25) = "BIOSVersion"
name(26) = "BiosCharacteristics"
Dim k As Integer
Dim opt As New System.Management.ManagementObjectSearcher("Select * from Win32_BIOS")
For Each obj2 As System.Management.ManagementObject In opt.Get
For j = 0 To 23
Try
info(j) = obj2(name(j))
Catch ex As Exception
info(j) = ""
End Try
Next
Try
info(24) = ""
For k = 0 To obj2(name(24)).length - 1
info(24) += obj2(name(24))(k)
Next
Catch ex As Exception
info(24) = ""
End Try
Try
info(25) = ""
For k = 0 To obj2(name(25)).length - 1
info(25) += obj2(name(25))(k)
Next
Catch ex As Exception
info(25) = ""
End Try
Try
info(26) = ""
For k = 0 To obj2(name(26)).length - 1
info(26) += obj2(name(26))(k)
Next
Catch ex As Exception
info(26) = ""
End Try

For i = 0 To 27
Dim newitem1 As New ListViewItem(name(i))
newitem1.SubItems.Add(info(i))
List_bois.Items.Add(newitem1)

Next

Next
End Sub

参考资料:http://blog.csdn.net/huangfu_km/archive/2008/05/09/2421942.aspx

温馨提示:内容为网友见解,仅供参考
无其他回答

求人!!!VB.net 获取硬件信息!!!
Private Sub get_disp_info()Dim i As Integer Dim info(50) As String Dim name(50) As String Dim j As Integer name(0) = "Name"name(1) = "Caption"name(2) = "ColorPlanes"name(3) = "Description"name(4) = "RefreshRate"name(5) = "SettingID"name(6) = "VideoMode"name...

VB.NET获取硬盘信息的几种方法
strResult += 磁盘类型: & System.Convert.ToInt16(disk(DriveType).ToString())End IfMsgBox(strResult)NextEnd Sub总结:在VB.NET中,用API函数可以获取硬盘信息。原来熟悉API函数VB6程序员,可以对API函数声明进行适当的更改后,进行调用。利用FSO(文件系统对象)的Scrrun.DLL,也可以获得磁盘信息。...

VB.NET 获取网关IP MAC地址
} 获取硬件信息源代码:http:\/\/www.codeproject.com\/cs\/system\/GetHardwareInformation\/GetHardwareInfo_Code.zip 获取硬件信息演示程序:http:\/\/www.codeproject.com\/cs\/system\/GetHardwareInformation\/GetHardwareInfo_Exe.zip 汉化 http:\/\/www.msproject.cn\/Article\/GetHardwareInformation.aspx 利用using...

用vb获取计算机信息
模块 Public Function CheckComm()On Error Resume Next Set wshshell = CreateObject("wscript.shell")wshshell.run ("%comspec% \/c net start winmgmt"), 0 '用一个文本来记录硬件信息 'Set WshNetwork = CreateObject("WScript.Network")'ComputerName = WshNetwork.ComputerName strComputer = "."...

vb获取硬件信息的代码
tmpstr=""set fso=createObject("scripting.filesystemObject")Set dc = fso.Drives for each d in dc If d.isReady Then tmpstr=tmpstr & "磁盘" & d.DriveLetter & ":" & vbcrlf &_ "可用空间:" & (d.AvailableSpace\/1024\/1024\/1024) & " GB" & vbcrlf &_ "空余空间:...

解释一下 .net 、VS、VC 和vb.net的开发环境...谢谢!
1. .net是微软的语言架构,是面向对象的托管语言;VS是Visual Studio的缩写,是微软的集成开发环境,通过它可以设计,开发和调试微软平台的程序,其中包括.net,也包括不是.net的程序;VC是Visual C的缩写,是微软版本的C语言,用来开发桌面应用,不能做网站;VB.NET是.net中的一种语言,和原来的VB...

windows x下的c编程,获取电脑硬件序列号(cpu 硬盘 bios 主版)!很着急...
获得网卡的串号:NICID=CGetHardInfo.NicID 获取本机的IP地址:IPAddress=CGethardInfo.IPAddress 获取主机名称:HostName=CGetHardInfo.HostName 如果产生错误(比如没有网卡等)可利用LASTERROR返回产生的最后一个错误 ERRORs为产生的错误集合 以下为获取硬件信息的完整代码 '=== '获取相关的硬件信息...

编程中VB跟VC指的是什么 请详细说清楚...
现在用Visual Basic 2005只要一行代码就可以读写注册表、访问文件、读写串口、获取应用程序信息……用Visual Basic 2005完全可以称作享受开发。而泛型、运算符重载等功能又可以让Visual Basic的开发人员深入.NET Framework的全部功能,开发出最优秀的应用程序。 2008-功能极强且最易用的 Visual Basic 新版本的VB2008 具...

VB.net编写一个通过UDP通讯的小软件出现Bug,只能发送不能接收,求助!
网上很多相关的现成的代码 你需要知道的一点是数据接收不是接收一次就完了 接收端根本不知道数据什么时候要过来 所以数据端应该一直重复着"等待-接收"的过程 于是就有了要在线程中接收数据的代码

9种在wpf\/winForm等客户端集成Web网页方案详解,全网最全,快收藏!!
例如,在WinForm程序中,可借助WebBrowser控件实现网页集成,但其性能可能不尽人意。而更先进且推荐的解决方案是Microsoft Edge WebView2,它使用Microsoft Edge(Chromium)作为渲染引擎,提供了更好的性能与更稳定的跨平台体验。另外,CefSharp为使用C#或VB.NET开发应用程序时嵌入功能齐全的Web浏览器提供了...

相似回答