-
Refreshing PlayList
Hi,
I'm trying to read information about items of a playlist from a cdRom, but when i click on the button which should show me the info i get records such as:
"Unknown Artist" and "Unknown Album"
but if i click on the button in the second time, i get the actual info.
How Can I avoid this problem?
Here is the code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim wmp As New WMPLib.WindowsMediaPlayer
For t As Integer = 0 To wmp.cdromCollection.Item(0).Playlist.count - 1
Dim rt As dsTemp.OnClickRow = Me.DsTemp1.OnClick.NewRow
rt.Album = wmp.cdromCollection.Item(0).Playlist.Item(t).getItemInfo("Album")
rt.Track = t + 1
rt.Song = wmp.cdromCollection.Item(0).Playlist.Item(t).getItemInfo("Title")
rt.Performer = wmp.cdromCollection.Item(0).Playlist.Item(t).getItemInfo("Artist")
rt.Composer = wmp.cdromCollection.Item(0).Playlist.Item(t).getItemInfo("Composer")
rt.Genre = wmp.cdromCollection.Item(0).Playlist.Item(t).getItemInfo("Genre")
Me.DsTemp1.OnClick.Rows.Add(rt)
Next
Exit Sub
Thanks In Advance