After clicking on a command button - how would I play a wave file thats saved as:
C:\program files\napster\music1.wav
Thanks!!
~john
Printable View
After clicking on a command button - how would I play a wave file thats saved as:
C:\program files\napster\music1.wav
Thanks!!
~john
Declare Function sndPlaySound Lib "WINMM.DLL" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Const SND_SYNC = &H0
Const SND_ASYNC = &H1
Const SND_NODEFAULT = &H2
Const SND_LOOP = &H8
Const SND_NOSTOP = &H10
Public Function soundplay()
SoundName$ = "c:\program files\napster\music.wav"
wFlags% = SND_ASYNC Or SND_NODEFAULT
X% = sndPlaySound(SoundName$, wFlags%)
End Function
'then make a command button
'and add this code
Module1.soundPlay
put all the code in a module except the commmand button code, sorry