There is the code to do it!
[DllImport("winmm.dll")]
private static extern bool PlaySound( string szSound, IntPtr hMod, PlaySoundFlags flags );
[Flags]
public enum PlaySoundFlags: int
{
SND_SYNC = 0x0000,
SND_ASYNC = 0x0001,
SND_NODEFAULT = 0x0002,
SND_LOOP = 0x0008,
SND_NOSTOP = 0x0010,
SND_NOWAIT = 0x00002000,
SND_FILENAME = 0x00020000,
SND_RESOURCE = 0x00040004
}
PlaySound( strFileName, IntPtr.Zero, soundFlags);
SND_SYNC //plays the sound after the event for example a button being pushed
SND_ASYNC //play sound as soon as event happens
SND_NODEFAULT //don't play the default sound if the soundsource is not found
SND_LOOP //play the wav over and over
SND_NOSTOP //don't stop any currently playing sound
SND_NOWAIT //don't wait if the sound driver is busy
SND_RESOURCE //indicates you are using a wav from a resource
SND_FILENAME //indicates you are using a wav from a file source