Hi smile,
Open Visual Studio and Right Click inside the ToolBox and select Add Tab option from the Context Menu.
The Add Tab Button will add a new Tab in the Toolbox and you will need to set a suitable name to it.
Now inside the newly created Tab, you need to Right Click and click Choose Items… from the Context Menu.
Then look for the Windows Media Player within the COM components tab of the Choose Toolbox Items window.
Finally, Click OK and the Windows Media Player control will now be added to the Visual Studio ToolBox.
Now drag drop the Windows Media Player to the Form.
Then write the following code in the Form Load event handler.
Inside this event handler set the URL property of the Windows Media Player.
C#
private void Form1_Load(object sender, EventArgs e)
{
axWindowsMediaPlayer1.URL = @"D:\Files\Sample.mp3";
}
VB.Net
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
axWindowsMediaPlayer1.URL = "D:\Files\Sample.mp3"
End Sub
Screenshot