C#.NET 中的檔案對話框

基礎篇

C# 簡介

開發環境

變數與運算

流程控制

陣列

函數

物件

例外處理

函式庫篇

檔案處理

資料結構

正規表達式

Thread

應用篇

視窗程式

媒體影音

網路程式

遊戲程式

手機程式

資料庫

雲端運算

特殊功能

委派

擴展方法

序列化

LinQ

WPF

網路資源

教學影片

投影片

教學文章

軟體下載

考題解答

101習題

屬性 說明
FileName 一個包含在檔對話方塊中選定的檔案名的字串,包括檔的完整路徑。
FileNames 獲取對話方塊中所有選定檔的檔案名。
AddExtension 指示如果用戶省略副檔名,對話方塊是否自動在檔案名中添加副檔名。
CheckFileExists 指示如果用戶指定不存在的檔案名,對話方塊是否顯示警告。
CheckPathExists 獲取或設置一個值,該值指示如果用戶指定不存在的路徑,對話方塊是否顯示警告。
DefaultExt 默認檔副檔名,返回的字串不包含句點 (.),預設值為一空字串 ("")。當用戶輸入檔案名時未指定檔的副檔名則自動以該屬性來補全副檔名,如果 DefaultExt 屬性為默認空字串,則以當前選定的篩選器中的文件類型來補全缺少的文件副檔名。
DereferenceLinks 指示對話方塊返回的是快捷方式引用的檔的位置(設置為True)還是返回快捷方式(.lnk)的位置(設置為False)。預設值為True,即選中快捷方式的時候,FileName 返回的是檔的真實路徑,如果該值為False,則返回的是該快捷方式所在的位置。
Filter 當前檔案名篩選器字串,該字串決定對話方塊的"另存為檔類型"或"檔類型"框中出現的選擇內容。
FilterIndex 獲取或設置檔對話方塊中當前選定篩選器的索引。
InitialDirectory 檔對話方塊顯示的初始目錄。
Multiselect 指示對話方塊是否允許選擇多個檔。
ShowReadOnly 指示對話方塊是否包含唯讀核取方塊。當它為True的時候,將會在如圖一紅圈的位置顯示"以唯讀方式打開"的核取方塊。
ReadOnlyChecked 指示是否選定唯讀核取方塊,默認為False,需要與 ShowReadOnly 屬性配合使用。
RestoreDirectory 指示對話方塊在關閉前是否還原當前目錄。
Title 獲取或設置檔對話方塊標題。

參考文獻

  1. OpenFileDialog 元件常用屬性和方法 — http://killworm737.pixnet.net/blog/post/21934694

Post preview:

(will not be published)


本網頁的作者、授權與引用方式

作者
陳鍾誠,於金門大學資訊工程系,電子郵件:wt.ude.uqn|ccc#wt.ude.uqn|ccc,網站:http://ccckmit.wikidot.com
授權
本文採用創作共用 (Creative Common) 3.0 版的 姓名標示─非商業性─相同方式分享 授權條款,歡迎轉載或修改使用,但若做為商業使用時必須取得授權,引用本文時請參考下列格式。
中文版 (APA格式)
陳鍾誠 (07 Dec 2010 00:40),(網頁標題) C#.NET 中的檔案對話框,(網站標題) 免費電子書:C# 程式設計,07 Dec 2010 00:40,取自 http://cs0.wikidot.com/filedialog ,網頁修改第 4 版。
英文版 (APA格式)
Chung-Chen Chen (07 Dec 2010 00:40), Retrieved 07 Dec 2010 00:40 from http://cs0.wikidot.com/filedialog, Page Revision 4.
page revision: 4, last edited: 07 Dec 2010 00:43
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /