ShellTreeView (or) Other, You decide

Posted on 2004-11-14
Medium Priority
Last Modified: 2010-04-05
Hello All;

   Is their a way in a ShellTreeView to display Only
The Folder that are located in the Main Folder of the program?

   The program is installed in:
   C:\Program Files\My Program\
   Sub Folders in the [My Program] folder are:
   My Utilities | My Pictures | My Personal | My What Ever Else.
{ so on, and on }

   Is their a way to make the Shell only show what is contained in
[My Program] Folder. And not the entire computer.
And no way to browse outside of the [My Program] folder?

Thank You
Question by:Wayne Barron
  • 3
LVL 17

Accepted Solution

Wim ten Brink earned 100 total points
ID: 12589057
Wouldn't you have to assign the root for this?


Yep. Assign 'C:\Program Files\My Program' to the ShellTreeView.Root and all you see is every folder with this one as root... And use ExtractFilePath(ParamStr(0)) to set the folder of your application as root.
LVL 31

Author Comment

by:Wayne Barron
ID: 12589109
how would this be accomplished if say.
The user was to install the program into

D:\My Program\....
E:\Program Files\My Program

And so forth.
  Is there a way to code it to where it will pick up on any Root?
Depending on User-Install prefrence?

Can you Alex, or someone make a example up of something like this?

LVL 14

Assisted Solution

DragonSlayer earned 100 total points
ID: 12590201
In that case, you need to find the folder of the .exe:

ShellTreeView1.Root := ExtractFilePath(ParamStr(0));

* Alex should get the point for pointing out the Root property
LVL 31

Author Comment

by:Wayne Barron
ID: 12590690
Thank you both [Alex & Slayer];

  I added it in like so:

ShellTreeView1.Root := ExtractFilePath(ParamStr(0));

1 more question right quick, just to let me know if this is suppose to do it.

  This is the way that the folder is going right now, to the sample project that I just tested it on, as a quicky.

  E:\Delphi Codes\Project\Project.exe file here with codes of course.

When program opens it shows this
   Delphi Codes  <-- Main Folder
      Test                <-- A test folder a made

Now in the [Delphi Codes] Folder itself their is about 15 other folder
But they are not shown.

   So this is my question:?

   Is it suppose to show the Main Supporting folder.
   And have it as your main?
Like in my case it is the [Delphi Codes] Folder

Thanks guys.
I will split the points, because you both helped.

LVL 31

Author Comment

by:Wayne Barron
ID: 12590696
never mind.
I just re-read Alex's post, and he states
[you see is every folder with this one as root]

So that answers my question.

Take Care Guys.


Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question