467,915 Members | 1,201 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Vb.Net , Open File Dialog

How to enable user for selecting only folders and not the files with
the Open File Dialog. i.e. I want only path of the selected folder is
to be returned by Open File Dialog.
i.e Open File Dialog should work like a Dir List Box in VB 6.0
or any other control is there to act as a Dir List Box

Help Me, Thanking You
Amit Shinde
Nov 20 '05 #1
  • viewed: 38254
Share:
9 Replies
Cor
Amit,
There is a very nice sophisticated FolderBrowserDialog in VB.net 2003.
I hope this information save you a lot of work,
Cor
Nov 20 '05 #2
"Cor" <no*@non.com> wrote in message news:<3f***********************@reader22.wxs.nl>.. .
Amit,
There is a very nice sophisticated FolderBrowserDialog in VB.net 2003.
I hope this information save you a lot of work,
Cor


I could not find that Control(FolderBrowserDialog)
Please help me more in implementing that Control.
Thanking You
Amit D. Shinde
Nov 20 '05 #3
part of the .net framework in both 2002 and 2003 versions.

namespaces are:

system.windows.forms.openfiledialog
system.windows.forms.savefiledialog

they are found in your toolbox...look at the help files for examples of
their use.

hth,

steve
"Amit D.Shinde" <am*******@yahoo.com> wrote in message
news:9a**************************@posting.google.c om...
"Cor" <no*@non.com> wrote in message

news:<3f***********************@reader22.wxs.nl>.. .
Amit,
There is a very nice sophisticated FolderBrowserDialog in VB.net 2003.
I hope this information save you a lot of work,
Cor


I could not find that Control(FolderBrowserDialog)
Please help me more in implementing that Control.
Thanking You
Amit D. Shinde

Nov 20 '05 #4
"Amit D.Shinde" <am*******@yahoo.com> schrieb
"Cor" <no*@non.com> wrote in message
news:<3f***********************@reader22.wxs.nl>.. .
Amit,
There is a very nice sophisticated FolderBrowserDialog in VB.net
2003. I hope this information save you a lot of work,
Cor


I could not find that Control(FolderBrowserDialog)
Please help me more in implementing that Control.


It is in the toolbox. Only in VB.Net 200*3*, as Cor wrote.
--
Armin

Nov 20 '05 #5
no...it is present in 2002 version as well...both versions work swimmingly
well. ;^)

"Armin Zingler" <az*******@freenet.de> wrote in message
news:uY**************@TK2MSFTNGP10.phx.gbl...
"Amit D.Shinde" <am*******@yahoo.com> schrieb
"Cor" <no*@non.com> wrote in message
news:<3f***********************@reader22.wxs.nl>.. .
Amit,
There is a very nice sophisticated FolderBrowserDialog in VB.net
2003. I hope this information save you a lot of work,
Cor


I could not find that Control(FolderBrowserDialog)
Please help me more in implementing that Control.


It is in the toolbox. Only in VB.Net 200*3*, as Cor wrote.
--
Armin

Nov 20 '05 #6
Cor
Steve
The question was using Open File Dialog for folderDialog.
There is a folderDialog now in 2003, my expirience using OpenFileDialog for
that is lousy.
When you want it absolute do it in 2002, then I think it is even better to
make it yourself once using the treeview.
That is not such a big job if you put the special folders extra in it.
Cor
Nov 20 '05 #7
"steve" <as*@abc.com> schrieb im Newsbeitrag
news:vn************@corp.supernews.com...
> Amit,
> There is a very nice sophisticated FolderBrowserDialog in VB.net
> 2003. I hope this information save you a lot of work,
> Cor

I could not find that Control(FolderBrowserDialog)
Please help me more in implementing that Control.


It is in the toolbox. Only in VB.Net 200*3*, as Cor wrote.


no...it is present in 2002 version as well...both versions work swimmingly
well. ;^)


I can't find the FolderBrowserDialog in 2002.

--
Armin

Nov 20 '05 #8
"Cor" <no*@non.com> scripsit:
The question was using Open File Dialog for folderDialog.
There is a folderDialog now in 2003, my expirience using OpenFileDialog for
that is lousy.
When you want it absolute do it in 2002, then I think it is even better to
make it yourself once using the treeview.
That is not such a big job if you put the special folders extra in it.


Are you talking about a folder browser dialog?

NET 1.1:

'System.Windows.Forms.FolderBrowserDialog'

Note that there is a bug in Fx 1.1 that causes a really bad error when
using a path which is longer than ~128 characters. This occurs on unicode
systems only. Use the PInvoke solutions mentioned below instead.

The property for hiding the button that allows the user to create a new
folder doesn't work on Windows 2000.

..NET 1.0:

<http://www.codeproject.com/cs/miscctrl/folderbrowser.asp>
<http://support.microsoft.com/?kbid=306285>
<http://www.gotdotnet.com/team/vb/FolderBrowser.exe>
<http://groups.google.com/groups?selm=q0JKzDbmCHA.2144%40cpmsftngxa09>

--
Herfried K. Wagner
MVP ∑ VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9
Cor
Herfried,
Thanks, I know this, because I see it everytime when I say that I am glad
there is a new dirbox in VB.net 2003.
I think it would not cost me more than 2 hours to make it totaly from
scratch with a treeview.

But for the ones like I was when I started with VB.net this is not an easy
solution.
It cost a lot of headaches before you know how to get the personal.folder,
to make a treeview and how to get the dirinfo. :-)
When you know that, I think that it is one of the easiest things to make and
it is only a dialogform.
(That makes it more strange that there is a bug in it, or is that bug maybe
in the dirinfo too?)
Maybe I make it when I am on the road with the FCNHTA site as a demo.

I have always those starting people in mind when I see this question.
Any other one would just make it himself.

But when I see it wrong, please correct me?
:-)
Cor
Nov 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by John | last post: by
2 posts views Thread by Jonathan Trevor | last post: by
reply views Thread by Dune | last post: by
5 posts views Thread by charles | last post: by
7 posts views Thread by Peter | last post: by
5 posts views Thread by Stefano Tonello | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.