DetectAudio




Declare Function waveOutGetNumDevs Lib "winmm.dll" _
Alias "waveOutGetNumDevs" () As Long
'Now place this code in the Form_Load Event of the Startup form:


Dim i As Integer
i = waveOutGetNumDevs()
If i > 0 Then
MsgBox "Your system supports a sound card.", vbInformation, "Sound Test"
Else
MsgBox "Your system cannot play Sound Blaster Files.", vbInformation, "Sound Test"
End If

'Now, press F5, and try the example. If your system supports a Sound Card,

'it will return a message saying that, if not, it will tell you your system

'doesn't.

Now that alot of programs made in VB have sounds played when
something happens, it is good to know if a System actually
supports Sound Playing. To try it, place this code in the
General Declarations section of a Module:










( detectaudio.html )- by Paolo Puglisi - Modifica del 17/12/2023