473,511 Members | 16,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

OpenFileDialog that can select folders?

Is there any way to hack OpenFileDialog (either in .NET 2.0 or in Win32)
that will allow the user to select a folder rather than a file? Better yet,
multiselect them.

I know about FolderBrowserDialog, but it's not satisfactory because it
doesn't show or follow shortcuts, and also because users are not as familiar
with it.

Feb 5 '06 #1
9 41531
Michael:

BrowseForFolder() API will allow you to select folder rather than
file.

The following code snippet required for selecting folder.
Shell32.ShellClass shl = new Shell32.ShellClass();
Shell32.Folder2 fld = (Shell32.Folder2)shl.BrowseForFolder(0,
strCaption, 0, System.Reflection.Missing.Value);

"fld.Self.Path" gives the absolute folder path.

-------
Kristi.

Feb 5 '06 #2
Hello Michael,

http://groups.google.com/group/micro...1dc6236beb5fbc

MC> Is there any way to hack OpenFileDialog (either in .NET 2.0 or in
MC> Win32) that will allow the user to select a folder rather than a
MC> file? Better yet, multiselect them.
MC>
MC> I know about FolderBrowserDialog, but it's not satisfactory because
MC> it doesn't show or follow shortcuts, and also because users are not
MC> as familiar with it.
MC>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Feb 5 '06 #3
I know about FolderBrowserDialog. It does not show or follow shortcuts.
"Michael Nemtsev" <ne*****@msn.com> wrote in message
news:9c**************************@msnews.microsoft .com...
Hello Michael,

http://groups.google.com/group/micro...1dc6236beb5fbc

MC> Is there any way to hack OpenFileDialog (either in .NET 2.0 or in
MC> Win32) that will allow the user to select a folder rather than a
MC> file? Better yet, multiselect them.
MC> MC> I know about FolderBrowserDialog, but it's not satisfactory
because
MC> it doesn't show or follow shortcuts, and also because users are not
MC> as familiar with it.
MC> ---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do
not cease to be insipid." (c) Friedrich Nietzsche

Feb 5 '06 #4
Thanks to the 2 people who told me to use FolderBrowserDialog, but please
see second paragraph below. Any other ideas?

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Is there any way to hack OpenFileDialog (either in .NET 2.0 or in Win32)
that will allow the user to select a folder rather than a file? Better
yet, multiselect them.

I know about FolderBrowserDialog, but it's not satisfactory because it
doesn't show or follow shortcuts...



Feb 5 '06 #5
Either roll your own or get one from a 3rd party vendor.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Thanks to the 2 people who told me to use FolderBrowserDialog, but please
see second paragraph below. Any other ideas?

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Is there any way to hack OpenFileDialog (either in .NET 2.0 or in Win32)
that will allow the user to select a folder rather than a file? Better
yet, multiselect them.

I know about FolderBrowserDialog, but it's not satisfactory because it
doesn't show or follow shortcuts...


Feb 5 '06 #6

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:Of*************@TK2MSFTNGP14.phx.gbl...
Either roll your own or get one from a 3rd party vendor.


OK, I'd very much like to know how to do either one. This afternoon I'm
going to experiment with HookProc and see how much I can modify FileDialog.
I haven't found a 3rd-party product that actually fills the bill yet,
although there are lots of FileDialogs that are modified in *other* ways.
Feb 5 '06 #7
> I haven't found a 3rd-party product that actually fills the bill yet,
although there are lots of FileDialogs that are modified in *other* ways.
Besides that, one black box is as black as another, and 3rd party vendor's
black boxes aren't tested as well as Microsoft's. That's why I tend to roll
my own!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:u9*************@TK2MSFTNGP15.phx.gbl...
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:Of*************@TK2MSFTNGP14.phx.gbl...
Either roll your own or get one from a 3rd party vendor.


OK, I'd very much like to know how to do either one. This afternoon I'm
going to experiment with HookProc and see how much I can modify
FileDialog. I haven't found a 3rd-party product that actually fills the
bill yet, although there are lots of FileDialogs that are modified in
*other* ways.

Feb 6 '06 #8
Please try our Dialog Workshop .NET
CaOpenFileDialog component allows to select folders.

Please visit http://www.componentage.com for details.

Alex

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Is there any way to hack OpenFileDialog (either in .NET 2.0 or in Win32)
that will allow the user to select a folder rather than a file? Better
yet, multiselect them.

I know about FolderBrowserDialog, but it's not satisfactory because it
doesn't show or follow shortcuts, and also because users are not as
familiar with it.

Feb 7 '06 #9
Hello Michael,

As I moticed in the previous thread, please try Dialog Workshop .NET:

http://www.componentage.com

There are many advanched features in our dialog components including folder
selection in FileOpen dialog component.

-Alex

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Thanks to the 2 people who told me to use FolderBrowserDialog, but please
see second paragraph below. Any other ideas?

"Michael A. Covington" <lo**@ai.uga.edu.for.address> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
Is there any way to hack OpenFileDialog (either in .NET 2.0 or in Win32)
that will allow the user to select a folder rather than a file? Better
yet, multiselect them.

I know about FolderBrowserDialog, but it's not satisfactory because it
doesn't show or follow shortcuts...


Feb 7 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1459
by: Michael A. Covington | last post by:
Has anyone implemented something like OpenFileDialog that *also* allows you to select folders? I know about the folder-browser tool, which *only* lets you see and select folders, not whole...
2
1827
by: Michael A. Covington | last post by:
Has anyone created either... (1) a version of OpenFileDialog that can select folders, not just files; or (2) a version of FileBrowserDialog that is a little more user-friendly (more like...
0
1656
by: Jaco Karsten | last post by:
Hi I am desperately looking for a way to select multiple folders from an explorer type TreeView like the one used with the Windows backup utility. I would like to offer the user the ability to...
2
3067
by: don | last post by:
has anyone experienced problems with interactions between OpenFileDialog and FileStream? When I select "open" from an OpenFileDialog the subsequent calls to FileStream do not create a file. If I do...
0
1293
by: Michael A. Covington | last post by:
Is there a simple way to modify OpenFileDialog (in either Win32 or .NET) so that the user can select folders as well as files? I know about FolderBrowser, which does not show any files at all and...
4
731
by: Chuck Edgeworth | last post by:
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...
4
8453
by: Noa | last post by:
Hi, Is there a way to use OpenFileDialog1 in order to multi-select folders? I saw in msdn site a sample of multi-file-selections. I need to select multiple folders and to apply an algorithm on...
2
1376
by: Bernie Yaeger | last post by:
I've asked this question before but now I need something different: I need to select files using openfiledialog, which is easy enough. But I want to select a file or files (multiselect) and also...
4
2107
MarkoKlacar
by: MarkoKlacar | last post by:
Hi, Is there a way to recursively select folders and upload the files in the current, so to speak, folder? I know that there exists a possibility to upload a file in the same folder that the...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.