473,396 Members | 1,726 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,396 software developers and data experts.

OpenFolder Dialog

Is there is something like OpenFile Dialog but open folder
instead?
Nov 20 '05 #1
7 1372
I am running VS 2003, and there is a FolderBrowserDialog control. I looked
on another machine running VS 2002, and the control did not seem to be
available. However, you could achieve this using API calls as well.

Anthony

"MrKrich" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
Is there is something like OpenFile Dialog but open folder
instead?

Nov 20 '05 #2
* "MrKrich" <an*******@discussions.microsoft.com> scripsit:
Is there is something like OpenFile Dialog but open folder
instead?


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]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
Hi Herfried,

I was waiting for it Herfried.

:-))

A real question, how many people are using paths longer than 128characters,
in a commandline you even cannot type it as far as I know.

So it is an error, however what me triggers are the words "real bad error"

Cor
Nov 20 '05 #4
A path name of more than 128 characters is long, but not extreme by any
means...

It's nice to know of the bug, it's the sort of thing that you would never
have a problem with in development or testing, but you could guarantee that
the first real user would have a real long path name.... Murphys Law and
all that!

Regards
Simon
"Cor" <no*@non.com> wrote in message
news:Ob*************@tk2msftngp13.phx.gbl...
Hi Herfried,

I was waiting for it Herfried.

:-))

A real question, how many people are using paths longer than 128characters, in a commandline you even cannot type it as far as I know.

So it is an error, however what me triggers are the words "real bad error"

Cor

Nov 20 '05 #5
Cor
Hi Simon,

The change that it is when there is an error gives the real file name is
low, so it means that you have to set the IO in a try block.

Because it is always a disk operation, that should always in my opinion.

So therefore there can be a little extra check in it be useful and is the
warning in this message right.
(When I give this answer I always do, but the answer was already given).

An error is never good, but Herfried is alway writting by this one
"a real bad error" and that is the only place he does, therefore my OT to
him.

(And why I did not warn this time, I was waiting on that "it has a real bad
error" from Herfried )

:-))

Just my thought about it.

Cor

A path name of more than 128 characters is long, but not extreme by any
means...

It's nice to know of the bug, it's the sort of thing that you would never
have a problem with in development or testing, but you could guarantee that the first real user would have a real long path name.... Murphys Law and
all that!

Nov 20 '05 #6
* "Cor" <no*@non.com> scripsit:
I was waiting for it Herfried.
:-)
A real question, how many people are using paths longer than 128characters,
in a commandline you even cannot type it as far as I know.
On my file system, there are lots of paths longer than 128 characters.
I never typed them in a commandline, but I picked them from a dialog.
So it is an error, however what me triggers are the words "real bad error"


It's IMO very bad, because it can cause wrong behavior of your
application.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
* "Cor" <no*@non.com> scripsit:
An error is never good, but Herfried is alway writting by this one
"a real bad error" and that is the only place he does, therefore my OT to
him.


It's one of the rare cases I use this sentence. It's a bug
(one of the famous buffer overflow bugs).

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

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

Similar topics

1
by: Prosonman | last post by:
Hi, What is the best way to transfer variables to and from a dialog box? My project consists of a form with a number of controls, lets say three Labels, when a label is clicked it opens a dialog...
4
by: serge calderara | last post by:
Dear all, I need to display a common Open folder dialog in order to be able to select a particular folder. I have check for the FolderBrowserDialog object but it does not display my all drive...
23
by: George | last post by:
Is there a way to customize the open file common dialog? I am trying to modify the button text so I can create a delete file common dialog. I need the same functionality of the open file common...
1
by: Carmine | last post by:
I'm currently writing a small program that churns on a repetitive task while displaying a progress & cancel modeless dialog. I've been having problems due to threadlocking, and I was wondering if...
4
by: Alexander | last post by:
Hi, I have written a program that takes on some operations much more time than I expected. As I have seen users clicking wildly on the screen to make something happen, I want to follow the...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
11
by: Zytan | last post by:
I have created a new form from the main form. When I close the main form with the 'x' close button, its Form.FormClosed event is run, but not the dialog's. Is this normal? It is ok /...
0
by: Moezzie | last post by:
So ive got a bit of a problem here. Ive been searching the net about this for quite some time now but i just cant seem to figure out how to open a dialog that ive made in QtDesigner. Of corse i...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.