Try this:
---------------------------------
Detect if Sound Card Available:
Declare Function waveOutGetNumDevs Lib "winmm.dll" Alias "waveOutGetNumDevs"
() as Long
- Returns number of devices available to Play sound files (returns 0 if none
available)
---------------------------------
Play Sound:
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal
lpszSoundName As String, ByVal uFlags As Long) as Long
lpzSoundName - Name of sound to play
uFlags - Options for playing the sound
Constants:
SND_SYNC - played synchronously, function does not return until
sound ends
SND_ASYNC - played asynchronously, function returns immediately
after beginning sound
SND_NODEFAULT - if sound cannot be found, returns silently without playing
the default sound
SND_LOOP - will continually play sound until sndPlaySound is
called with a null
SND_NOSTOP - if sound currently playing, returns false without
playing the requested sound
Good Luck!!!
Gonzo
"Brian Basquille" <tb********@eircom.netSPAM> wrote in message
news:aj*******************@news.indigo.ie...
Hello all,
What is the syntax for simply playing a WAV file in your program?
Am learning VB and have two VB books but don't wanna root through them to
find the code.
Any help would be much appreciated!
Thanks in advance,
Brian