Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with music player. Simple problem
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
recneps




PostPosted: 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.
Sponsor
Sponsor
Sponsor
sponsor
recneps




PostPosted: Sat Feb 28, 2004 4:45 pm   Post subject: (No subject)

Uploaded it through submissions Very Happy

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




PostPosted: Mon Mar 01, 2004 9:09 am   Post subject: (No 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.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
recneps




PostPosted: Mon Mar 01, 2004 7:00 pm   Post subject: (No 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.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: