|
-
Mar 11th, 2010, 01:34 PM
#1
Thread Starter
Lively Member
[RESOLVED] Listbox Playlist
Hello All,
I have a form with a Listbox.
In the listbox is a list of files in a certain directory with one extension (*.mp3)
I'm using this code for that:
Code:
Dim folderInfo As New IO.DirectoryInfo("C:\Windows")
Dim arrFilesInFolder() As IO.FileInfo
Dim fileInFolder As IO.FileInfo
arrFilesInFolder = folderInfo.GetFiles("*.mp3")
For Each fileInFolder In arrFilesInFolder
Listbox1.Items.Add(fileInFolder.Name)
Next
So what i want is that the form plays the files in the Listbox like a playlist.
"\songs\1.mp3" are just examples, it also has to work with different names.
Code:
Player1.URL = Application.StartupPath & "\songs\1.mp3" is for example the first one
and "\songs\2.mp3" the next, etc... And when 1.mp3 is finished playing 2.mp3 starts, and so
on. And i also need to be able to hit the Play button to start a song you selected, and start
playing from there. And a pause button to pause, and a stop button to stop.
Thanks in Advance,
TooLongName
Last edited by TooLongName; Mar 11th, 2010 at 01:35 PM.
Reason: Edit...
-
Mar 11th, 2010, 02:34 PM
#2
Re: Listbox Playlist
Have you tried using Microsoft Multimedia Control to play mp3. That gives you the functionality to play mp3 very comfortably....
alternatively you can also use Windows Media Player
http://www.dreamincode.net/forums/showtopic57357.htm
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 11th, 2010, 02:35 PM
#3
Thread Starter
Lively Member
Re: Listbox Playlist
And how can i actually make it act like a playlist
-
Mar 11th, 2010, 02:37 PM
#4
Re: Listbox Playlist
I updated the above post... What do you want to use Microsoft Multimedia Control or Windows Media Player?
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Mar 11th, 2010, 02:41 PM
#5
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|