I'm developing a mediaplayer.There is a listbox acting as filename container. Now I want to select multiple files from openfile commondialog and add those selected files to the listbox. How can I do this?Plz help me to figure this out.

Set the multiselect property of OpenFileDialog to true

OpenFileDialog1.Multiselect = True

After this the user can select more than one file by pressing shift and selecting the files
you can get the names of all selected files by the property FileNames
by writing something like this

Me.ListBox1.Items.Add(Me.OpenFileDialog1.FileNames(i))

Check this link to read more about filedailog properties
http://www.startvbdotnet.com/controls/dialog.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.