BP Forums
need help with my music player:) - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: need help with my music player:) (/showthread.php?tid=319)



need help with my music player:) - Protection4Real - 02-22-2011

hello, i need help with this code here

this code should get the playlists that you created and then show them in a listbox but it gives me an error i would need some help with itSmile

Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim direc = "C:\Users\Admin\Documents\Visual Studio 2010\Projects\Xpress Player\Xpress Player\bin\Debug\playlists"
        For Each directory As String In System.IO.Directory.GetDirectories(direc)
            ListBox2.Items.Add(directory)
        Next

    End Sub



Re: need help with my music player:) - xolara - 02-22-2011

Can you tell us the error it makes?


Re: need help with my music player:) - brandonio21 - 02-22-2011

Yeah, what is the error?


Re: need help with my music player:) - Protection4Real - 02-23-2011

this is the error

Items collection cannot be modified when the DataSource property is set.

and i just want the get the name of the folder/Playlists
not the path <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->