uses FileCtrl;const
SELDIRHELP = 1000;
procedure TForm1.Button1Click(Sender: TObject);
var
Dir: string;
begin
Dir := 'C:\MYDIR';
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
Label1.Caption := Dir;
end;
SELDIRHELP = 1000;
procedure TForm1.Button1Click(Sender: TObject);
var
Dir: string;
begin
Dir := 'C:\MYDIR';
if SelectDirectory(Dir, [sdAllowCreate, sdPerformCreate, sdPrompt],SELDIRHELP) then
Label1.Caption := Dir;
end;
OpenDialog1.InitialDir:=path
sPath:string;
begin
edtPath.SetFocus;
if SelectDirectory('請選擇路徑',#13,spath) then edtPath.Text:=sPath;
end;
如
opendialog1.initaldir:='C:'