473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

how to make a "select directory name" dialog

Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not seem
to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


Nov 20 '05 #1
13 6848
In article <el**************@TK2MSFTNGP11.phx.gbl>, Mark Kamoski wrote:
Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not seem
to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


What version of visual studio are you using? If your using 2003 - it is
already included. It is called the FolderBrowserDialog control. If
your using 2002... Well, you have two choices. You can use the
SHBrowseForFolder API call. Or you can create a class that inherits
from System.Windows.Forms.Design.FileNameEditor. This will give you
access to the protected type FileNameEditor.FolderBrowser :) So,
something like:

Public Class DirectoryBrowser
Inherits System.Windows.Forms.Design.FileNameEditor

Private browser As New FolderBrowser

...
End class

HTH
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2
Tom--

Thank you for the reply.

I can't say I'm happy about it, wrt VS.NET 2002.

In fact my research had brought me to the same conclusion (judging from
what I found on www.Google.com recently); but, I was HOPING that I was
wrong and that there might be a better way in VS.NET but... oh well.

Thank you for the reply.

--Mark
Tha
"Tom Shelton" <to*@mtogden.com> wrote in message
news:Ov***************@TK2MSFTNGP11.phx.gbl...
In article <el**************@TK2MSFTNGP11.phx.gbl>, Mark Kamoski wrote:
Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not seem to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


What version of visual studio are you using? If your using 2003 - it is
already included. It is called the FolderBrowserDialog control. If
your using 2002... Well, you have two choices. You can use the
SHBrowseForFolder API call. Or you can create a class that inherits
from System.Windows.Forms.Design.FileNameEditor. This will give you
access to the protected type FileNameEditor.FolderBrowser :) So,
something like:

Public Class DirectoryBrowser
Inherits System.Windows.Forms.Design.FileNameEditor

Private browser As New FolderBrowser

....
End class

HTH
--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #3
Well if you don't like that suggestion try using a hammer and nails. maybe
those tools are more appropriate for your use.

"Mark Kamoski" <mk******************************************@yaho o.com>
wrote in message news:eV**************@TK2MSFTNGP10.phx.gbl...
Tom--

Thank you for the reply.

I can't say I'm happy about it, wrt VS.NET 2002.

In fact my research had brought me to the same conclusion (judging from
what I found on www.Google.com recently); but, I was HOPING that I was
wrong and that there might be a better way in VS.NET but... oh well.

Thank you for the reply.

--Mark
Tha
"Tom Shelton" <to*@mtogden.com> wrote in message
news:Ov***************@TK2MSFTNGP11.phx.gbl...
In article <el**************@TK2MSFTNGP11.phx.gbl>, Mark Kamoski wrote:
Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not

seem
to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


What version of visual studio are you using? If your using 2003 - it is
already included. It is called the FolderBrowserDialog control. If
your using 2002... Well, you have two choices. You can use the
SHBrowseForFolder API call. Or you can create a class that inherits
from System.Windows.Forms.Design.FileNameEditor. This will give you
access to the protected type FileNameEditor.FolderBrowser :) So,
something like:

Public Class DirectoryBrowser
Inherits System.Windows.Forms.Design.FileNameEditor

Private browser As New FolderBrowser

...
End class

HTH
--
Tom Shelton
MVP [Visual Basic]

Nov 20 '05 #4
Road Warrior--

LOL

Yes, actually, I was thinking of reverting to using a goose-quill ink pen
and papyrus rather than all of this computer-program hooey, but there's the
client to please....

....and so on...

....ah, but those were the days....

Where's my abacus?

--Mark
"Road Warrior" <sp*****@getbounced.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Well if you don't like that suggestion try using a hammer and nails. maybe
those tools are more appropriate for your use.

"Mark Kamoski" <mk******************************************@yaho o.com>
wrote in message news:eV**************@TK2MSFTNGP10.phx.gbl...
Tom--

Thank you for the reply.

I can't say I'm happy about it, wrt VS.NET 2002.

In fact my research had brought me to the same conclusion (judging from
what I found on www.Google.com recently); but, I was HOPING that I was
wrong and that there might be a better way in VS.NET but... oh well.

Thank you for the reply.

--Mark
Tha
"Tom Shelton" <to*@mtogden.com> wrote in message
news:Ov***************@TK2MSFTNGP11.phx.gbl...
In article <el**************@TK2MSFTNGP11.phx.gbl>, Mark Kamoski wrote:
Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not

seem
to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


What version of visual studio are you using? If your using 2003 - it is
already included. It is called the FolderBrowserDialog control. If
your using 2002... Well, you have two choices. You can use the
SHBrowseForFolder API call. Or you can create a class that inherits
from System.Windows.Forms.Design.FileNameEditor. This will give you
access to the protected type FileNameEditor.FolderBrowser :) So,
something like:

Public Class DirectoryBrowser
Inherits System.Windows.Forms.Design.FileNameEditor

Private browser As New FolderBrowser

...
End class

HTH
--
Tom Shelton
MVP [Visual Basic]


Nov 20 '05 #5
So now I guess you are telling me you want your abacus back? Indian giver!

"Mark Kamoski" <mk******************************************@yaho o.com>
wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...
Road Warrior--

LOL

Yes, actually, I was thinking of reverting to using a goose-quill ink pen
and papyrus rather than all of this computer-program hooey, but there's the client to please....

...and so on...

...ah, but those were the days....

Where's my abacus?

--Mark
"Road Warrior" <sp*****@getbounced.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Well if you don't like that suggestion try using a hammer and nails. maybe
those tools are more appropriate for your use.

"Mark Kamoski" <mk******************************************@yaho o.com>
wrote in message news:eV**************@TK2MSFTNGP10.phx.gbl...
Tom--

Thank you for the reply.

I can't say I'm happy about it, wrt VS.NET 2002.

In fact my research had brought me to the same conclusion (judging from
what I found on www.Google.com recently); but, I was HOPING that I was
wrong and that there might be a better way in VS.NET but... oh well.

Thank you for the reply.

--Mark
Tha
"Tom Shelton" <to*@mtogden.com> wrote in message
news:Ov***************@TK2MSFTNGP11.phx.gbl...
In article <el**************@TK2MSFTNGP11.phx.gbl>, Mark Kamoski wrote:
Hi Everyone--

How can one to make a "select directory name" dialog?

It would be great if one could use the FileOpenDialog but it does not

seem
to be straight-forward.

Anyway, if you have any hints or otherwise, please send them along.

Thank you.

--Mark


What version of visual studio are you using? If your using 2003 - it is
already included. It is called the FolderBrowserDialog control. If
your using 2002... Well, you have two choices. You can use the
SHBrowseForFolder API call. Or you can create a class that inherits
from System.Windows.Forms.Design.FileNameEditor. This will give you
access to the protected type FileNameEditor.FolderBrowser :) So,
something like:

Public Class DirectoryBrowser
Inherits System.Windows.Forms.Design.FileNameEditor

Private browser As New FolderBrowser

...
End class

HTH
--
Tom Shelton
MVP [Visual Basic]


Nov 20 '05 #6
* "Mark Kamoski" <mk******************************************@yaho o.com> scripsit:
I can't say I'm happy about it, wrt VS.NET 2002.

In fact my research had brought me to the same conclusion (judging from
what I found on www.Google.com recently); but, I was HOPING that I was
wrong and that there might be a better way in VS.NET but... oh well.


If you don't like this, you can use a pinvoke solution.

:->

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
* "Mark Kamoski" <mk******************************************@yaho o.com> scripsit:
How can one to make a "select directory name" 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 #8
* "Road Warrior" <sp*****@getbounced.net> scripsit:
Well if you don't like that suggestion try using a hammer and nails. maybe
those tools are more appropriate for your use.


Please stop posting nonsense like this.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #9
OK you convinced me. NOT


"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:uG*************@tk2msftngp13.phx.gbl...
* "Road Warrior" <sp*****@getbounced.net> scripsit:
Well if you don't like that suggestion try using a hammer and nails. maybe those tools are more appropriate for your use.


Please stop posting nonsense like this.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #10
* "Road Warrior" <sp*****@getbounced.net> scripsit:
So now I guess you are telling me you want your abacus back? Indian giver!


Go back to the Java groups.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #11
Loosen your belt Henfried...you might strangle yourself.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:eS**************@TK2MSFTNGP09.phx.gbl...
* "Road Warrior" <sp*****@getbounced.net> scripsit:
So now I guess you are telling me you want your abacus back? Indian
giver!
Go back to the Java groups.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #12
* "Road Warrior" <sp*****@getbounced.net> scripsit:
OK you convinced me. NOT


Now I know you are a Java programmer who suffers from depressions.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #13
* "Road Warrior" <sp*****@getbounced.net> scripsit:
Loosen your belt Henfried...you might strangle yourself.


EOT

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #14

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

Similar topics

23
by: ian justice | last post by:
Before i post actual code, as i need a speedyish reply. Can i first ask if anyone knows off the top of their head, if there is a likely obvious cause to the following problem. For the moment i've...
16
by: lkrubner | last post by:
Are there any benchmarks on how much an extra, unneeded VARCHAR, CHAR, INT, BIGINT, TEXT or MEDIUMTEXT slows down a database call with MySql? PostGre info would also be useful. I'm trying to...
2
by: Pablo | last post by:
Friends! I need to show the dialog "select folder" and get the path selected, using vb.net. The OpenFileDialog control is useless as I want to select a folder and not a file. In vb6 I achieved...
0
by: John | last post by:
Hi all, is there a way to call "Select Users or Groups" dialog from .NET? This is the dialog when you browse the users or groups on local computer or on Windows domain. Please advice. Thanks.
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
8
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid...
3
by: divya | last post by:
Hi, I have a table tblbwday with 2 fields Name and Birthday.I have written this script for displaying evryday names of the people on that day. <% set objConn...
7
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and...
3
by: yawnmoth | last post by:
//form//input //form//select//option I can combine those with an or (|), but to make my code more concise, would it be possible to reuse the //form bit? Could I maybe do something like this,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.