If asked this question before I know but I really need to be able to play sounds on Vb3
can someone please help me with a code? anyone?
Printable View
If asked this question before I know but I really need to be able to play sounds on Vb3
can someone please help me with a code? anyone?
You can use sndPlaySound API.
Usage: PlayWav WaveFileNameCode: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
Example: PlayWav "C:\MiFile.wav"
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819