logo
vbRad Home
Source Code
Book Reviews
Forum
Links
About Us
Contribute

Compare Databases with SQL Effects Clarity
 
 Check if the computer supports sound

Posted on
2/18/2001
Author:
Robert Gelb
Email:
Not Shown
Applies To OS:
NT, 9x, 2000
Product:
5, 6



The function below indicates whether the computer supports sound. What it doesn't do is tell you whether the computer has a sound card installed. Because you could have a sound card installed but it could be disabled or simply drivers are not installed.

Add the following to a .BAS, .FRM or .CLS

'Place in General declarations
Private Declare Function waveOutGetNumDevs Lib "winmm.dll" () As Long

'Returns True or False indicating whether Sound functions will work
Public Function SoundSupported() As Boolean
    SoundSupported = IIf(waveOutGetNumDevs() <> 0, True, False)
End Function

 


Add Your Comment  

Name: Email Address: all fields optional
Notify me via email when someone responds to this message (valid email required).

Enter the word: