Solved

Browse Dialog

Posted on 1997-07-08
3
291 Views
Last Modified: 2010-04-06
Sometime in software, we see a browse dialog that enable us to chose a folder, not a file like open dialog do. So, I want to know how to call that dialog within delphi 3.
0
Comment
Question by:fmichaud061597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:ronit051397
ID: 1338491
use the SHBrowseForFolder to Displays a dialog box that enables the user to select a folder
see API documentation.
0
 

Author Comment

by:fmichaud061597
ID: 1338492
I'd like to have an example on how to use it, and what unit declares that procedure.
0
 
LVL 3

Accepted Solution

by:
sperling earned 50 total points
ID: 1338493
Here's a part of an util of mine using ShBrowseForFolder.

----
uses
  .....

  ShlObj, ActiveX;


procedure TForm1.ButtonBrowseClick(Sender: TObject);
var
  bi      : TBrowseInfo;
  idl     : POINTER;
  im      : IMAlloc;
begin
  Application.NormalizeTopMosts;
  with bi do begin
    hWndOwner := Handle;
    pidlRoot := nil;
    pszDisplayName := StrAlloc(MAX_PATH);
    lpszTitle := 'Select IIS Log file folder';
    ulFlags := BIF_RETURNONLYFSDIRS;
    lpfn := nil;
    lParam := 0;
    iImage := 0;
  end;
  idl := ShBrowseForFolder ( bi );
  Application.RestoreTopMosts;
  if idl<>nil then begin
    ShGetPathFromIDList(idl, bi.pszDisplayName);
    EditLogDir.Text := StrPas(bi.pszDisplayName);
  end;
  StrDispose(bi.pszDisplayName);
  ShGetMalloc(im);
  im.Free(idl);
end;
----

Regards,

Erik.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

615 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