473,398 Members | 2,404 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,398 software developers and data experts.

select a folder

Hello,
I would like to know how can I select present a dialog which will let me
to choose a directory?
Thanks!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
13 5707
juli jul <ju******@yahoo.com> wrote:
I would like to know how can I select present a dialog which will let me
to choose a directory?


Use System.Windows.Forms.FolderBrowserDialog.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2
Juli,

When you use Net 1.1 than you can use the

FolderBrowserDialog

Keep in mind that there is a bug resolved for that in the newest 1.1 SP.

When you use 1.0 there is a folder folderviewer in the VB Powerpack (the
controls in that are normal Net controls)

I hope this helps,

Cor
Nov 16 '05 #3
Hello,
I did:
FolderBrowserDialog fb=new System.Windows.Forms.FolderBrowserDialog();
but it shows mw an empty dialog and I can't choose any folder there,why?
Thank you very much!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4
Thanks but I still don't understand how can I know the name of directory
choosed by the user? How can I present the user the option to choose a
directory?
Thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
Hello juli,
Hello,
I would like to know how can I select present a dialog which will let
me
to choose a directory?
Thanks!
*** Sent via Developersdex http://www.developersdex.com *** Don't just
participate in USENET...get rewarded for it!


Hi,

you can user the Folder Browser Dialog control if you are using windows forms.

joseph

Nov 16 '05 #6
Juli,

As with all dialogs

mydialog.ShowDialog()

http://msdn.microsoft.com/library/de...ialogtopic.asp

I hope this helps?

Cor
Nov 16 '05 #7
juli jul <ju******@yahoo.com> wrote:
I did:
FolderBrowserDialog fb=new System.Windows.Forms.FolderBrowserDialog();
but it shows mw an empty dialog and I can't choose any folder there,why?
Thank you very much!


Have a look at the examples in MSDN - they should answer all your
questions.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #8

Hello,
I use the Folder Browser Dialog but all I can see in this dialog is a
window with "ok" ,"cansel" and "make new folder" buttons which are not
reacting and the window doesn't present directories. How to make it
work?
Thanks!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #9
juli jul <ju******@yahoo.com> wrote:
I use the Folder Browser Dialog but all I can see in this dialog is a
window with "ok" ,"cansel" and "make new folder" buttons which are not
reacting and the window doesn't present directories. How to make it
work?


Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #10
Hello,
This is all the reference in code I have to the folder browser:
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
this.folderBrowserDialog1 = new
System.Windows.Forms.FolderBrowserDialog();
this.folderBrowserDialog1.ShowDialog();

but all I can see is an empty window with no folders to choose,any clue
why?
Thanks a lot:)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #11
Check the value of folderBrowserDialog1.RootFolder and then use
Environment.GetFolderPath to validate the path for the RootFolder. Perhaps
there is a corruption in your environment or in the registry.

DalePres

"juli jul" <ju******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hello,
This is all the reference in code I have to the folder browser:
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
this.folderBrowserDialog1 = new
System.Windows.Forms.FolderBrowserDialog();
this.folderBrowserDialog1.ShowDialog();

but all I can see is an empty window with no folders to choose,any clue
why?
Thanks a lot:)
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #12
juli jul <ju******@yahoo.com> wrote:
This is all the reference in code I have to the folder browser:
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
this.folderBrowserDialog1 = new
System.Windows.Forms.FolderBrowserDialog();
this.folderBrowserDialog1.ShowDialog();

but all I can see is an empty window with no folders to choose,any clue
why?


See http://www.pobox.com/~skeet/csharp/incomplete.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #13
Hello,
I tried to print the root folder and got : desktop.
And while I was printing the Environment.GetFolderPath of the root
folder I got the desktop path(full with the c:/).
Could you please tell me if it has something to do with the fact that I
can't see any folder in the folder browser?
Thank you!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '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...
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...
18
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...
1
by: strutsng | last post by:
I want a web page that allows the user to select a folder as input, not files. If I use <input type="file">, I couldn't select a folder as input, I can only select a single file as input. In my...
3
by: microsoft | last post by:
vb.net What's the best way to allow the user to select an existing folder or create a new one and select. Not a file, just a folder.
3
by: djpaul | last post by:
Hello guys, I'm busy with an photogallery and i wanted to implent this script i wrote to select a folder and put there the photo's in. But i only get 1 folder in the drop-down menu and the other is...
4
by: dkirkdrei | last post by:
I am having a problem getting results back from a SELECT statement using the script below. The field names contain decimals and I am not sure wether or not this is causing the problem or not?? I am...
2
by: Kuldeep | last post by:
Hi all, I have a requirement, where the user has to select a folder and all the files in that folder have to be imported to my databse. To acheive this i need a control which enables the user to...
2
by: abhijitmishra1102 | last post by:
Hi, i want to export files from DB to a selected folder on client machine. But i dont know how 2 show a select folder dialog box . we hav file seleect dialogbox but no folder select dialogbox ....
5
by: remya1000 | last post by:
i'm using VB.NET 2003 application program. by using OpenFileDialog, we can select the file name or file path. OpenFileDialog1.ShowDialog() pgmPath.Text =...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.