This documentation is archived and is not being maintained.

FileDialog.ValidateNames Property

Gets or sets a value indicating whether the dialog box accepts only valid Win32 file names.

[Visual Basic]
Public Property ValidateNames As Boolean
public bool ValidateNames {get; set;}
public: __property bool get_ValidateNames();
public: __property void set_ValidateNames(bool);
public function get ValidateNames() : Boolean;
public function set ValidateNames(Boolean);

Property Value

true if the dialog box accepts only valid Win32 file names; otherwise, false. The default value is true.


If the edit control contains anything but spaces when the user clicks OK, the dialog returns the file name, whether it is valid or not. No default extension is added to the text.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

FileDialog Class | FileDialog Members | System.Windows.Forms Namespace