OpenFileDialog

  • Thread starter Chuck Edgeworth
  • Start date

C

Chuck Edgeworth

I'm trying to be able to select a combination of files and folders. When I
try to use the OpenFileDialog it will allow me to select them but when I
press the Open button it only informs me of the files I chose not the
folders as well? Am I missing something? I know Microsoft can determine
the folders that are selected because if you do this with the Explorer file
open it will bring up windows with the contents of the folders you selected
as well as the files. Is this another case of Microsoft not providing us
with the same tools that they use? Any help would be appreciated?

Chuck
 
Ad

Advertisements

C

Cor

Hi Chuck,

When we look to Explorer than we see
On the left hand a treeview working as a folderbrowserdialog
On the right hand a listview working as a openfileopendialog,

I do not see what you miss?

Cor
 
C

Chuck Edgeworth

Yes there is a listview on the right hand side. And it list folders and
files. If you select a folder and lets say a text file you can then do a
File->Open and it opens the text file and bring up a explorer window of the
directory you had selected. This means that their program is aware of the
directory that was selected. Using the OpenFileDialog I have not found a way
to be informed of the directories that I have selected when I press the Open
button. Just the files. Any ideas??

Thanks,

Chuck
 
C

Cor

Hi Chuck,

We are comming closer are you talking about a multiselect situation from the
OpenFileDialog?

However I cannot remember me that I ever saw a openfiledialog that had the
same usage as the right pane from Explorers. ( Can select files from more
than 1 directory).

The listview that is used in Explorer can. That listview you can build
using the listview, and I should not know why not almost in the same way as
it is in Explorer.

But you have to fill it yourself, and I would start to look at the
directoryinfo class for that.

Than you should of course also build your own actions.

I hope this helps,

Cor
 
Ad

Advertisements

C

Chuck Edgeworth

Thanks for the reply,
You are correct, I honestly don't know where my head was... Guess I was
just wishing that since their OpenFileDialog could handle mulitselecting
both directories and files that they would pass that information along to
you when you press the Open button. Guess I will have to work around it.

Thanks again,
Chuck
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top