components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Private Sub InitializeComponent()
Me.ListBox1 = New System.Windows.Forms.ListBox
Me.SuspendLayout()
\'
\'ListBox1
\'
Me.ListBox1.Location = New System.Drawing.Point(8, 8)
Me.ListBox1.Name = \"ListBox1\"
Me.ListBox1.Size = New System.Drawing.Size(272, 212)
Me.ListBox1.TabIndex = 0
\'
\'Form1
\'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 238)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.ListBox1})
Me.Name = \"Form1\"
Me.Text = \"Form1\"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim SoundDeviceQuery As New SelectQuery(\"Win32_SoundDevice\")
Dim SoundDeviceSearch As New ManagementObjectSearcher(SoundDeviceQuery)
Dim SoundDeviceInfo As ManagementObject
For Each SoundDeviceInfo In SoundDeviceSearch.Get()
ListBox1.Items.Add(\"Sound Device Description: \" & SoundDeviceInfo(\"Caption\").ToString())
ListBox1.Items.Add(\"Sound Device Status: \" & SoundDeviceInfo(\"status\").ToString())
ListBox1.Items.Add(\"Sound Device Manufacturer: \" & SoundDeviceInfo(\"Manufacturer\").ToString())
Next
End Sub
VB.NET
Function GetEmbeddedResource(ByVal strname As String) As System.IO.Stream
Return System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(strname)
End Function
\' 模块文件
Module Module1
\'VB.NET
Function GetEmbeddedResource(ByVal strname As String) As System.IO.Stream
Return System.Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(strname)
End Function