pls teach me how to play a simple .wav file using the simplest method!
thanx
thanx
thanx
Printable View
pls teach me how to play a simple .wav file using the simplest method!
thanx
thanx
thanx
Put this in a module
VB Code:
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Public Const SND_ASYNC = &H1 ' play asynchronously
Then call it like this
VB Code:
sWavFile = "C:\windows\media\Ding.wav" x = sndPlaySound(sWaveFile, SND_ASYNC)
Greg
kool is the wav a restricted lenth or size though?
Nope.
Greg
Wicked. Thanks for the code. :)