Computer Science Canada

Help with music player. Simple problem

Author:  recneps [ Sat Feb 28, 2004 4:42 pm ]
Post subject:  Help with music player. Simple problem

Anyone help me here? I made a music player following a tutorial i found on the net. Everything works just fine, until you reach the end of the playlist, it gives a runtime error. Can someone show me how to make it stop when its the last entry in the list? (im a complete newb Very Happy)
heres the code.
Interesting. No attachments allowed??? Bah.

Author:  recneps [ Sat Feb 28, 2004 4:45 pm ]
Post subject: 

Uploaded it through submissions Very Happy

http://www.compsci.ca/v2/download.php?id=1154 <- That should work.

Author:  Tony [ Mon Mar 01, 2004 9:09 am ]
Post subject: 

sorry it took a while to reply, I had to get to school to load up VB.

first of all - name your buttons something other then "command#", I had to go though the entire code Rolling Eyes

as for the runtime error
code:

If List1.ListIndex < List1.ListCount Then
List1.ListIndex = List1.ListIndex + 1
Else
List1.ListIndex = 0
End If


this will loop it back to first entry once it reaches the end. If you dont want it loop back, you shoud place a flag for stop or something instead of =0.

Author:  recneps [ Mon Mar 01, 2004 7:00 pm ]
Post subject: 

Thanks, i figured that out last night Very Happy i couldnt find the variable that counted the number of items Very Happy But i got it. Thanks anyways. Ill post final version in submissions.


: