Solved

Open folder

Posted on 2003-11-19
6
949 Views
Last Modified: 2008-02-01
Hi.. I'm using Delphi 6 in Windows XP, and I want the user to choose the folder name in which he will use the data in that folder as the database. I want to get the folder name which the user has chosen.. Is it using Open Dialog Box or using something else? Any help will be very much appreciated :) Thanksss..
0
Comment
Question by:pipinana2002
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
ID: 9785043
there is a selectdirectory-function

a sample

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses filectrl; //filectrl is used

procedure TForm1.Button1Click(Sender: TObject);
var s : string;
begin
  s := '';
  if selectdirectory(s,[],0) then
    showmessage('Directory '+s+' is selected');
end;

end.

meikl ;-)
0
 
LVL 5

Expert Comment

by:snehanshu
ID: 9785061
pipinana2002,
  You could use:
1) TDirectoryListBox from Win3.1
2) TDirectoryEdit from RX components (http://sourceforge.net/projects/rxlib/)
  for selecting folder names.
HTH,
...Snehanshu
0
 

Author Comment

by:pipinana2002
ID: 9785070
Hi meikl..

Thanks for your help :)

Can I actually remove the files and drives list from the display?

Thanks againn.. :)
0
Independent Software Vendors: 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!

 
LVL 5

Expert Comment

by:snehanshu
ID: 9785072
Thanks meikl,
  I did not know about that!
  pipinana2002: you have the solution from the best.
:-)
...Snehanshu
0
 

Author Comment

by:pipinana2002
ID: 9785091
Hi again meikl.. I already found how to do it.. hehehehehe thanks a lot for your helpp :):):) U're really great! :)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9785271
glad you got it,

to use another dialog-style,
just use the other syntax

procedure TForm1.Button1Click(Sender: TObject);
var s : string;
begin
  s := '';
  if selectdirectory('Select A Directory','',s) then
    showmessage('Directory '+s+' is selected');
end;

meikl ;-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downloading email attachments 2 85
Why can't I create any project with my delphi EXE file? 6 45
Delphi inherited method 6 78
Convert MS Word document to a PDF file 9 114
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 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