Play an MP3 file

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
‘this will play an MP3 file
‘change the MP3 file to one on your own PC
‘On my PC this started Winamp and played the audio file
Dim PlayMP3 As Process = Process.Start(“D:\music\atb.mp3″)
PlayMP3.WaitForExit()
End Sub
End Class

Play a wav file

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
‘you will need to replace the file below with a wav file on your own PC
My.Computer.Audio.Play(“C:\WINDOWS\system32\alsndmgr.wav”, AudioPlayMode.WaitToComplete)
End Sub
End Class