Visual Basic Programming Code Examples Visual Basic > Code Snippets Code Examples Detect if a sound card exists Detect if a sound card exists Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long Private Sub Form_Load() Dim nDev As Integer nDev = waveOutGetNumDevs() If nDev > 0 Then MsgBox "Your system supports a sound card.", vbInformation Else MsgBox "Your system cannot play Sound Blaster Files.", vbInformation End If End Sub