Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Visual Basic (http://www.programmingforums.org/forum18.html)
-   -   Media Player PlayList (http://www.programmingforums.org/showthread.php?t=15127)

~The~ICE~Man~ Feb 6th, 2008 2:22 PM

Media Player PlayList
 
Hello: 1ST off I will say I have not used VB6 ( Visual Basics Studio Enterprise ) in a few good years (LOL). I did take a course on Visual Basic .NET a few years ago & am now getting back into Programming.....
I have made a great Media Player. Everything I have put into it works perfectly, Its been tested on a few of my friends PC's. I know it works on Windows XP & Vista, And of course on Windows Me. All that have gotten a copy of it as it is sofar have loved it & gave it high reguards. However there is one thing that I am trying to get it to do that is giving me a major run around. I have a play list on it & I want it to cycle to the next song on the list when the previous song has finished. Any ideas on how to make it do as its told (LOL). I have tested it & so have those how got a copy of it. To see what files it will play as it is right now. Sofar I know it will play the following.... .avi .mp3 .mpeg .wav .wma .wmv .asf .asx .bmp .jpg jpeg .gif , and a few others,

Now is there anyway to make it play through a list and not stop after 1 song is played? maybe I seth the ListBox up wrong... Thanks

Sane Feb 6th, 2008 3:32 PM

Re: Media Player PlayList
 
Putting some information in a listbox won't automatically tell it that it should play the next song. It can't read your mind, unfortunately.

You have to set up an "event" to be triggered whenever a song reaches the end. Then link that event to a subroutine, which you will write, to simply change what song is playing.

I don't have the name of the corresponding event, but maybe this information can give you a push in the right direction.

~The~ICE~Man~ Feb 6th, 2008 5:49 PM

Re: Media Player PlayList
 
1 Attachment(s)
The pic to the left is the main I-Face, The pic to right is the Search side I added to it. Basic set up is Open the program click the " Open the Media Searcher ", On the Media Searcher pic the drive, Then the folder , Then the File, Once the user has clicked on a file, It will show up ( where yellow line is ), Then user clicks the " Load from ^ there To Down v " button, The file then jumps into where the purplish font is, They then click the " Send To Media Player Text Bar " button, On the Media Player its the red font at the bottom, Then to get the file to go to the Play List ( green font section ) they click on the button " Load v To ^ ", Then they can add more files if they want, Supposed to highlite a file then click play, NOTE: I hade it working great before I added the ListBox, Using just the TextBox but wanted more then one song to play in a row without having to manually load it again, Now when I hit the play button I get the following.....

Label not defined

Private Sub List1_Click()
If MediaPlayer.List1 = 0 Then GoTo Line
End Sub

I have tried may codes, I know the line is unfinished cos nothing I put in will do what i want it to do,, LOL

Code for Media Player is as follows

Private Sub Command1_Click()
MediaSearcher.Show
End Sub

Private Sub Command2_Click()
WindowsMediaPlayer1.URL = List1
End Sub

Private Sub Command3_Click()
If Text1 = Text1.Text Then
List1.AddItem Text1.Text
End If
End Sub

Private Sub List1_Click()
If MediaPlayer.List1 = 0 Then GoTo Line
End Sub

I have tried may codes, I know the line above is unfinished cos nothing I put in will do what i want it to do,, LOL

Code for the search side is as follows,, Even though I know The probem is not on this side,,,,,

Private Sub Command1_Click()
If Label1 = Dir1 + Label2 + File1 Then
Text1.Text = Label1
End If
End Sub

Private Sub Command2_Click()
If Text1.Text = Text1.Text Then
MediaPlayer.Text1 = MediaSearcher.Text1.Text
End If
End Sub

Private Sub Dir1_Change()
File1 = Dir1
Label1 = Text
End Sub

Private Sub Drive1_Change()
Dir1 = Drive1
Label1 = Text
End Sub

Private Sub File1_Click()
Label1 = Dir1 + Label2 + File1
End Sub

Private Sub Form_Load()
Label1 = Text
End Sub

Private Sub Text1_Change()
If Text1 = Dir1 + Label2 + File1 Then
Text1.Text = MediaSearcher.Text1.Text
End If
End Sub


All times are GMT -5. The time now is 9:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC