關於OpenDialog 一次讀進多個檔案的問題 |
答題得分者是:Rain
|
totodog
一般會員 發表:13 回覆:3 積分:3 註冊:2003-05-29 發送簡訊給我 |
|
Rain
資深會員 發表:31 回覆:236 積分:268 註冊:2003-02-17 發送簡訊給我 |
|
Mickey
版主 發表:77 回覆:1882 積分:1390 註冊:2002-12-11 發送簡訊給我 |
|
axsoft
版主 發表:681 回覆:1056 積分:969 註冊:2002-03-13 發送簡訊給我 |
totodog您好: 試試看下面的source Code unit Unit1; interface uses SysUtils, Forms, Dialogs; type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} // Include form definitions procedure TForm1.FormCreate(Sender: TObject); var openDialog : TOpenDialog; // Open dialog variable i : Integer; begin // Create the open dialog object - assign to our open dialog variable openDialog := TOpenDialog.Create(self); // Set up the starting directory to be the current one openDialog.InitialDir := GetCurrentDir; // Allow multiple files to be selected - of any type openDialog.Options := [ofAllowMultiSelect]; // Display the open file dialog if not openDialog.Execute then ShowMessage('Open file was cancelled') else begin // Display the selected file names for i := 0 to openDialog.Files.Count-1 do ShowMessage(openDialog.Files); end; // Free up the dialog openDialog.Free; end; end.[i]HAVE A NICE DAY FOR YOU 發表人 - axsoft 於 2003/08/12 11:23:40 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |