jhmblvd
asked on
How do you read the artist info and other data from a music file?
I am trying to create a playlist using windows media player component. I have code that will open up a song and play it, I now want to see what is playing. What is the best way to do this?
//This code loads a song. I want to display the songs title and artist info in a text box.
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
dlgOpen.InitialDirectory = My.Computer.FileSystem.CurrentDirectory
dlgOpen.ShowDialog()
Player.URL = dlgOpen.FileName
End Sub
You can add a label bellow the player and show that!
ASKER
I tried this:
Me.txtArtist.Text = dlgOpen.FileName.Trim
But it gives me the whole path to the file including the name of the song.
Me.txtArtist.Text = dlgOpen.FileName.Trim
But it gives me the whole path to the file including the name of the song.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks ipaulino! Works great