'language = Visual Basic 6

Public Sub CreatePlayList(ByRef songs() As String, ByVal name As String)

    Dim i As Integer

        Set listCollection = frmMusic.wmplay.playlistCollection
        
        Set list = listCollection.newPlaylist(name)
        
        frmMusic.wmplay.currentPlaylist = list

        For i = 0 To UBound(songs)
            Set wmpMedia = frmMusic.wmplay.newMedia(songs(i))
            frmMusic.wmplay.currentPlaylist.appendItem wmpMedia
        Next
 
End Sub
' I believe the above code will take my song array and create a playlist with
'the value of 'name'.

'Normally I play a single song with code similar to [wmplay.url = filename]
'Now that I have created a playlist, how do I play it?
'Thank you,
'Paul
OK, I'm stupid, I forgot the .controls.play (duh)

Please close this thread (or tell me how)

Thanks for viewing my code.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.