select a directory......

How do you select a directory with a dialog component?  I don't want the file dialog as I know I can select a file then parse off the directory, but I want to select a directory only. The D3 help says the report component has this feature, but I should not have to start using report components just to select a directory.  Is there an easier way?  Has anyone done this?  I'm using D3 with Win98.

           Thank you
jexd99Asked:
Who is Participating?
 
MadshiConnect With a Mentor Commented:
You can use the winAPI SHBrowseForFolder.
If you want to have a component rather than an API, you can probably find something on these sites:

Delphi Super Page:   http://nswt.tuwien.ac.at/delphi/index.htm
Torry's Delphi Pages:   http://www.torry.ru/

Any questions about SHBrowseForFolder? Ask me...

Regards, Madshi.
0
 
BoRiSCommented:
jexd99

Thereare  various components availabel for this, i now there are a couple at www.torry.ru
also I have writing my own component that creates a Directory Dialog, but I have upgraded it to D4, let me see if I have the D3 source code here, just leave you mail address i'll mail it to U...

Later
BoRiS

0
 
MadshiCommented:
Oooooooops, sorry BoRiS, your comment wasn't there, when I wrote my answer...
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
BlackDeathCommented:
hi, jexd99.

i've written such a comp manually some time ago.
if you want the code, post your eMail-address, i'll send it over t'ya.

bye,

Black Death.
0
 
jexd99Author Commented:
SHBrowseForFolder doesn't work on NT.  Even though I use Win98, I would like for this to work on NT also.  Anyone have an idea if the components work on NT, or are the components just a wrapper over SHBrowseForFolder?

           Thanks
0
 
MadshiCommented:
SHBrowseForFolder WORKS on WinNT4!!!
Your documentation must be old...  :-)

Regards, Madshi.
0
 
vanbeekCommented:
Instead of using SHBrowseForFolder, you can use SelectDirectory, see Delphi documentation for more information and an example.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.