程序代码: |
Imports System.Management
Private Sub button1_Click(sender As Object, e As EventArgs)
Dim searcher As New ManagementObjectSearcher("SELECT * FROM Win32_VideoController")
For Each FlashDeviceObject As ManagementObject In searcher.[Get]()
textBox1.Text = FlashDeviceObject("Name").ToString()
textBox2.Text = FlashDeviceObject("PNPDeviceID").ToString()
Next
End Sub
注意:PNPDeviceID 不一定是固定的。
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |