DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: In a VB6 Playlist - need to select new song

  1. #1
    Join Date
    Jul 2010
    Location
    Florida
    Posts
    5

    Red face In a VB6 Playlist - need to select new song

    Creating my playlisy as follows:

    Code:
                
               wmplay.currentPlaylist.Clear
               For iy = 0 To plCount - 1
                    Set wmpMedia = wmplay.newMedia(plNames(iy))
                    wmplay.currentPlaylist.appendItem wmpMedia
                Next iy
                wmplay.Controls.play
    This plays my playlist just fine. I have a separate listbox with the songs in the playlist. I'd like to be able to change the current playing song to the selected one. Do I need to recreate the list with the selected one at the top or is there a way to jump in and change the current selection in this playlist?

    Thank you.
    paul1145

    (Hope this time I put in the correct code markers.)

  2. #2
    Join Date
    Jul 2010
    Location
    Florida
    Posts
    5

    Smile workarounf VB6 Playlist select

    Code:
            wmplay.currentPlaylist.Clear
            Set wmpMedia = wmplay.newMedia(plNames(Index - 1))
            wmplay.currentPlaylist.appendItem wmpMedia
            For iy = 0 To plCount - 1
                If iy <> Index - 1 Then
                    Set wmpMedia = wmplay.newMedia(plNames(iy))
                    wmplay.currentPlaylist.appendItem wmpMedia
                End If
            Next iy
            wmplay.Controls.play
    What I did was, on the select event of a different song, I cleared and rebuilt the playlist with the selected song at the top. I'd still like to know if there's a one or two line Set currentlistitem = the_one_I_want solution.

    Thanks for looking
    Last edited by Hack; 07-07-2010 at 07:39 AM. Reason: Fixed Code Tags

Similar Threads

  1. UPDATE or INSERT in a trigger?
    By iordanis in forum Database
    Replies: 10
    Last Post: 03-18-2008, 02:57 PM
  2. Pass calculated value of SELECT box to php?
    By deBassMan in forum AJAX
    Replies: 1
    Last Post: 08-27-2007, 10:16 AM
  3. How do I find duplicate records?
    By Nancy in forum Database
    Replies: 2
    Last Post: 01-11-2002, 10:38 PM
  4. Replies: 1
    Last Post: 02-19-2001, 10:19 AM
  5. Difference Between SET and SELECT
    By Randy Pearson in forum Database
    Replies: 3
    Last Post: 08-18-2000, 02:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center