Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I add a wav file to my app?

Status
Not open for further replies.

lrfcbabe

Programmer
Jul 19, 2001
108
US
I am looking for a way to add a wav file to my application.
Can anyone help?
 
This should get you started:

Public Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long

Public Function Play(uFlags As Long)
Dim Rc As Long
Rc = sndPlaySound(mFileName, uFlags)
End Function

mFileName = "C:\Windows\Media\hello.wav"
Play (uFlags)
DoEvents
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top