Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Browse Dialog

Posted on 1997-07-08
3
Medium Priority
?
293 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 200 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

715 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