一、opendialog選擇檔案路徑
procedure tform4.but2click(sender: tobject);
varchobak : topendialog;
begin
chobak := topendialog.create(nil);
if chobak.execute() then
begin
showmessage(chobak.filename);
end;
二、selectdirctory 選擇資料夾路徑 //引用filectrl
procedure tform4.but1click(sender: tobject);
varfpath : string;
begin
if selectdirectory('選擇路徑11','o:\',fpath) then
begin
showmessage(fpath);
end;
endselectdirectory(『標題名』,'預設路徑','檔案路徑')
檔案路徑可以預設為d:\,若電腦沒有d盤預設為administrator資料夾;
delphi 選擇資料夾,路徑選擇,瀏覽資料夾
選擇資料夾,路徑選擇,資料夾資源管理器 推薦 selectdirectory vcl.filectrl.hpp if selectdirectory 請選擇目錄 daopath selectdirectory include filectrl.hpp const seldirhelp 1000 vo...
選擇乙個資料夾 Delphi
在delphi中,選擇乙個資料夾的操作主要有兩種方法。一種是通過 開啟 對話方塊 opendialog 控制項,通過定位乙個檔案來間接實現。另一種是利用delphi提供的selectdirectory函式。這個函式是在filectrl單元中定義的。第二種方法還有乙個附加的好處,它可以使用root引數...
Delphi 資料夾操作
uses shellapi 建立資料夾 procedure tfrmmain.cxbutton1click sender tobject begin createdirectory pchar extractfilepath paramstr 0 microblue nil end 刪除資料夾,放到...