Как проиграть MP3
Опубликовано Декабрь 8, 2015 автором Памирыч
How to play mp3 file / VB .NET
Imports WMPLib
Public Class Form1
Dim WithEvents Player As WMPLib.WindowsMediaPlayer
Private Sub PlayFile(ByVal url As String)
Player = New WMPLib.WindowsMediaPlayer
Player.URL = url
Player.controls.play()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
PlayFile("D:\СВЕЖИЕ ТРЕКИ\Simple.mp3")
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Player.close()
End Sub
End Class