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!

Playing a .wav file in VB 6 2

Status
Not open for further replies.

littlbro99

Programmer
Aug 11, 2001
4
US
HI I was wondering if someone could give me some code or tell me how to play a wav soiund in a vb program. I havn't coded in a long time so I would definatly rank myself as a novice at this point, so the simpler the better. Thanks for all your help in advance.
 
Here is the function
Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long


Here is an example
retval = PlaySound(App.Path & "\congrats.wav", 0, SND_FILENAME Or SND_ASYNC Or SND_NODEFAULT Or SND_LOOP)

Brad,
Free mp3 player,games and more.
 
Then add the Microsoft Multimedia Control 6.0 (components) for a cool GUI.

Have fun...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top