VB.NET 有自带的SoundPlayer 类
SoundPlayer 类
同步播放
Dim player As New System.Media.SoundPlayer()
player.SoundLocation = "d:/music/happy.mp3" & vbCr & vbLf
player.Load()
player.Play()
' 异步播放:
Dim player As New System.Media.SoundPlayer()
player.SoundLocation = "d:/music/happy.mp3" & vbCr & vbLf
player.LoadAsync()
player.PlaySync()
' 循环播放:
Dim player As New System.Media.SoundPlayer()
player.SoundLocation = "d:/music/happy.mp3" & vbCr & vbLf
player.Load()
player.PlayLooping()
这样比使用API或者控件方便多了