How to play sounds
This source code allows you to play sounds. If you use vb3 or the 16bit version of vb4, please use the 16bit code, otherwise use the 32bit code.

Select the following code with the mouse and copy it into the general section of a form or modul.

---16bit code begins here---
Declare Sub sndplaysound Lib "MMSystem" (ByVal Filename As String, ByVal Flags As Integer)
---16bit code ends here---

---32bit code begins here---
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal Filename As String, ByVal Flags As Long) As Long
---32bit code ends here---

Use the following code to play a sound:

---code begins here---
call sndplaysound ("filename.wav",1)
---code ends here---

Go back to my vb-page