You can P/Invoke on the PlaySound API:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" _
(ByVal lpszName As String, ByVal hModule As Integer, _
ByVal dwFlags As Integer) As Integer
Const SND_SYNC As Integer = &H0 ' play synchronously
Const SND_ASYNC As Integer = &H1 ' play asynchronously
Const SND_FILENAME As Integer = &H20000 ' lpszName is a file name
Const SND_PURGE As Integer = &H40 ' purge non-static events for task
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim RetStart As Integer = _
PlaySound("D:\WINDOWS\ring.wav", 0, SND_ASYNC Or SND_FILENAME)
Dim RetStop As Integer = _
PlaySound(Nothing, 0, SND_PURGE)
End Sub
Various other flag values and what they mean can be found here (where
PlaySound has been explained):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_playsound.asp
However, I'm not sure if one can play any other file types other than .wav
files with PlaySound. I could be wrong though - didn't have the time to test
it out.
hope that helps..
Imran.