Visual Basic > Code Snippets
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
Visual Basic Codes
ActiveX
Miscellaneous
Applications
Code Snippets
Common Dialogs
Special Effects
Database Stuff
Date Time
Files Drives
Forms
Graphics Games
Internet Stuff
Multimedia
Other
Strings
Windows