0

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.

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by manal
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.