Share via


FileDialog.CheckFileExists 属性

获取或设置一个值,该值指示如果用户指定不存在的文件名,对话框是否显示警告。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Overridable Property CheckFileExists As Boolean
用法
Dim instance As FileDialog
Dim value As Boolean

value = instance.CheckFileExists

instance.CheckFileExists = value
public virtual bool CheckFileExists { get; set; }
public:
virtual property bool CheckFileExists {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_CheckFileExists ()

/** @property */
public void set_CheckFileExists (boolean value)
public function get CheckFileExists () : boolean

public function set CheckFileExists (value : boolean)

属性值

当用户指定不存在的文件名时,如果对话框显示警告,值为 true;反之,值为 false。默认值为 false

备注

对继承 OpenFileDialog,默认值为 true;对继承 SaveFileDialog,默认值为 false

.NET Framework 安全性

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

FileDialog 类
FileDialog 成员
System.Windows.Forms 命名空间
CheckPathExists