Windows Explorer type control

Posted on 2006-05-05
Last Modified: 2010-04-05
Is there a windows explorer like control within delphi.  We have need of a change to our application (customer number driven) so when a person clicks on a button, it will open a specific (predefined) directory so the user can view any attachments associated wit the customer.  For example

\Customer documents\123456

Where "customer documents" is a predefined directory where all of the documents will be stored and
where 123456 relates to the customer number being viewed at the time (if the folder exists, open it, otherwise, create a new subfolder on the fly and then leave it there for future use.

Seperate question: Are there any plug in products that might also provide this same functionality that could be intergrated into our product that we could just call/reference

We don't have alot of strong delphi experience (only maintaining existing code) which is why, if the question sounds really basic, I appologize


please advise

Question by:Jackson_62
    LVL 26

    Accepted Solution

    Yes, check this package, just open sourced today...
    LVL 5

    Assisted Solution

    Im not to sure as to what you want done.
    1. the working DIR should it act like a Explorer browser for files
    2. Must this browser be contained in you application
    3. Are the customers allowed to view the other customers DIRs
    4. is it a DIR where information is stored for every customer that the program uses

    5. This is how i understand it...

    procedure TForm1.Button1Click(Sender: TObject);
    Workingdir := 'c:\Customer documents\';
    if directoryexists(workingdir+'123456') then
    //continue in customer DIR
    end else
          //create new Customer dir then work in it, if it cant raise exception
          if not CreateDir(workingdir+'123456') then
          raise Exception.Create('Cannot create New folder!');

    Author Comment

    Eddieshipman:  I believe if I read this correctly, the TShellView component would give me that functionality ?

    Scay7:  Yes, it appears you have the basics in place.  The end user would already have an inquiry screen in place with the customer up (e.g. customer number 123456).  What I envision would be tthat the program would only enable the 'document button" when a customer number has been retrieved (so to answer your second question, this application would be contained as part of my overall program).  At that point, the button would be enabled, and the end user has the ability to view any documents assciated with that customer.  In your code example, the customer number (e.g. value of field XXXXXX) would be used to either open an already existing subfolder in the working directory, or create a new one with the ability to open documents in the window, or drag and drop documents into the window.  

    In this application, the 'customer' does not have the ability to see their or any other customer documents, only the customer service rep who is viewing the data of that customer.

    the working directory will be a directory created before hand to contain all of the customer subfolders (and subsequent documents).  It will no doubt live on the server (e.g. I: drive ) rather then the individual PCs.

    So from the sounds of it, the solution appears to be fairly simple ?

    thanks in advance for both of your help -

    LVL 26

    Expert Comment

    Jackson_62, the controls I mentioned are enhanced over the standard TShellListView.

    Author Comment

    Does this logic also allow for the opening of files (e.g. similar to windows exploror logic) to correctly identify the application that corresponds to the file type ?
    LVL 26

    Expert Comment

    It actually hosts Explorer so it should do anything Explorer does.
    I don't use them personally.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now