AncientTiger
Programmer
Ok, I've worked with this control in the past, and it almost always confuses me for some reason.
I'm trying to build a simple app that's a music playlist player. I've got a "playlist" that is a listview control with a list of songs (file path for each in the .tag element), and a media player control.
I'm wanting the media control to trigger a "scrolling" script after the end of each song, but for some reason, it's just not working.
Here's what I've got so far:
Public Sub SCROLLLIST()
SI = TUNELIST.SelectedItem.Index
LC = TUNELIST.ListItems.Count
If SI = LC Then
SI = 1
Else
SI = SI + 1
End If
TUNELIST.ListItems(SI).Selected = True
DoEvents
PLAYSELECTED
DoEvents
End Sub
Public Sub PLAYSELECTED()
SI = TUNELIST.SelectedItem.Index '<<-the playlist listview
FPATH = TUNELIST.ListItems(SI).Tag
PLAYER.URL = FPATH
End Sub
Private Sub PLAYER_StatusChange()
If PLAYER.Status = "Stopped" Then
SCROLLLIST
End If
End Sub
The event is triggering, and the scrolling playlist is working, but the URL isn't loading into the control the way it should. Is there some way to reset the control? The player loads and plays the first song in the list when the app loads, but it won't play the next song when the first is finished.
------------------------------------
Over 20 years of programming, and still learning every day! ![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
I'm trying to build a simple app that's a music playlist player. I've got a "playlist" that is a listview control with a list of songs (file path for each in the .tag element), and a media player control.
I'm wanting the media control to trigger a "scrolling" script after the end of each song, but for some reason, it's just not working.
Here's what I've got so far:
Public Sub SCROLLLIST()
SI = TUNELIST.SelectedItem.Index
LC = TUNELIST.ListItems.Count
If SI = LC Then
SI = 1
Else
SI = SI + 1
End If
TUNELIST.ListItems(SI).Selected = True
DoEvents
PLAYSELECTED
DoEvents
End Sub
Public Sub PLAYSELECTED()
SI = TUNELIST.SelectedItem.Index '<<-the playlist listview
FPATH = TUNELIST.ListItems(SI).Tag
PLAYER.URL = FPATH
End Sub
Private Sub PLAYER_StatusChange()
If PLAYER.Status = "Stopped" Then
SCROLLLIST
End If
End Sub
The event is triggering, and the scrolling playlist is working, but the URL isn't loading into the control the way it should. Is there some way to reset the control? The player loads and plays the first song in the list when the app loads, but it won't play the next song when the first is finished.
------------------------------------
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)