You can use sndPlaySound API.
Code:
Private Declare Function sndPlaySound Lib "WinMM.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Const SND_NODEFAULT = &H2
Private Const SND_FLAG = SND_ASYNC Or SND_NODEFAULT
Public Sub PlayWav(pWavFile As String)
If Dir(pWavFile) <> "" Then
Call sndPlaySound(pWavFile, SND_FLAG)
End If
End Sub
Usage: PlayWav WaveFileName
Example: PlayWav "C:\MiFile.wav"
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819