473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

media player change

lee123
556 512MB
can someone help me figure out how i can get the myplaylist to play the next song down using a media player without using a button which i already have (Automatically) here is what i have in my project so far...


Expand|Select|Wrap|Line Numbers
  1. Code: ( text )
  2. Private Sub Add_Click()
  3.     MyPlayList.AddItem Combo1.Text & "" & Text1.Text
  4. End Sub
  5. Private Sub cmdClear_Click()
  6.     MyPlayList.Clear  'To clear the Play list
  7.     Text1.Text = ""
  8. End Sub
  9. Private Sub cmdNext_Click()
  10.     MyPlayList.ListIndex = MyPlayList.ListIndex + 1 'This for to scroll down to the next one
  11. End Sub
  12. Private Sub cmdPrevious_Click()
  13.     MyPlayList.ListIndex = MyPlayList.ListIndex - 1 'This is to scroll to the previous one up
  14. End Sub
  15. Private Sub Dir1_Change()
  16.     File1.Path = Dir1.Path
  17. End Sub
  18. Private Sub Drive1_Change()
  19.     Dir1.Path = Drive1.Drive
  20. End Sub
  21. Private Sub File1_Click()
  22.     Text1.Text = File1
  23. End Sub
  24. Private Sub MyPlayList_Click()
  25.     WindowsMediaPlayer1.URL = MyPlayList.List(MyPlayList.ListIndex)
  26. End Sub
  27. Private Sub WindowsMediaPlayer1_PlaylistChange(ByVal Playlist As Object, ByVal change As WMPLibCtl.WMPPlaylistChangeEventType)
  28.     If MyPlayList.ListIndex = (MyPlayList.ListCount - 1) Then
  29.         WindowsMediaPlayer1_StatusChange
  30.     End If
  31. End Sub
  32. Private Sub WindowsMediaPlayer1_StatusChange()
  33.     On Error Resume Next
  34.     Dim Answer As Integer
  35.     If WindowsMediaPlayer1.Status = "Finished" Then
  36.         Answer = MsgBox("Shall I Continue?", vbQuestion + vbYesNo, "Continue?")
  37.         If Answer <> vbYes Then End
  38.         MyPlayList.ListIndex = MyPlayList.ListIndex + 1
  39.         WindowsMediaPlayer1.URL = MyPlayList.List(MyPlayList.ListIndex)
  40.     End If
  41. End Sub
Please help me i am going crazy!!!!!! with this

lee123
Aug 9 '08 #1
2 2119
Dököll
2,364 Expert 2GB
Hey Lee!

Are you saying when you fire up the code your playlist runs automatically?

If this is the case, you should be halfway there, and I am sure you've tried everything. But what happens if you remove the method that runs your playlist automatically and place it under a button.

I'm going to try the code now and can tell you if I see anything.

Later!
Aug 13 '08 #2
lee123
556 512MB
no what i want is for the code to automatically play the next on down and so on until the list is complete!
Aug 13 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stephen Adam | last post by:
Hi there, Have spent a while trying to find out how to connect to Windows Media Player through COM. Unfortunately there doesnt seem to be much stuff about it on the web. What I need to do is...
6
by: Mustafa Rabie | last post by:
Hi All, I have a customer, who wants me to add online radio to his web site. 1) How can i add the media player object to the site 2) How can i dynamically change the url when i user clicks on a...
3
by: Darren | last post by:
OK, this should be really simple, but I still can't see where I can set an option to prevent Windows Media Player 9 from resizing the window when it loads at startup or when a file is played. I...
19
by: Tony | last post by:
I'm working on project that plays movies using Windows Media Player and I'm controlling everything with JavaScript. Per the client I only need to support IE 6 or greater which happens to make...
1
by: Mark C | last post by:
How do you close windows media player in a web page after its played. I have added a windows media player to my web page as: <object id="Player"...
0
by: =?Utf-8?B?RGFuaWxv?= | last post by:
Hi everybody, I need catch media player library events, as add a new sons or change attributes. When i modify the library in media player, my external win form application doesn't catch the...
2
riptide2049
by: riptide2049 | last post by:
I really have a problem here. I have a code that is suppost to take the href of a link from the right class;value of a link maked toreturn false. the value is a Media file the file is sent to...
5
by: Fred Chateau | last post by:
I am currently using an Object element of type "application/x-mplayer2" to create a media player in ASP.NET 3.5, and was wondering if there is a better way to instantiate WMP in a browser. I'm...
3
by: hurricane_number_one | last post by:
I want to be able to play/pause/next/back the tracks in whatever media player app is running. So if iTunes is running, it will receive those commands, if Windows Media Player is, it will receive...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.