I have a WinForms application with an OpenFileDialog in it and I'd like to enable selection of multiple files when the user interacts with the dialog. How can I accomplish this?
+2
A:
Don't know what you did, but when I click File/Open in Visual Studio 2008, it is possible to multi-select all files or just a part of them by clicking on the first file in the list, holding the shift key and then clicking on the last file.
EDIT: ok, you edited the question, seems that I misunderstood you in the first place. Idan K's answer should be correct.
Doc Brown
2010-01-11 13:16:26
no not in visual studio IDE please:) its coding, i been using winforms, when i click on fileopen, in my application, a file browser pops up, but i can select only one file, what is logic/code to select multiple images? i can't do control-a, then open, one file opens and copies into buffer?
abhilashm86
2010-01-11 13:32:54
+3
A:
See the OpenFileDialog::Multiselect property, from the docs:
Gets or sets a value indicating whether the dialog box allows multiple files to be selected.
To get the list of files selected you should use the OpenFileDialog::FileNames property.
Idan K
2010-01-11 13:39:45