Skip to Content
VB.NET Language in a Nutshell, Second Edition
book

VB.NET Language in a Nutshell, Second Edition

by Steven Roman PhD, Ron Petrusha, Paul Lomax
April 2002
Intermediate to advanced
688 pages
19h 51m
English
O'Reilly Media, Inc.
Content preview from VB.NET Language in a Nutshell, Second Edition

Name

SaveFileDialog Class

Namespace

System.Windows.Forms

Createable

Yes

Description

Represents a common dialog box for selecting or saving a file. The most common use of this dialog box is to ask the user for the name of a file, after which we can use VB’s functions to save an existing file under that name, since the dialog box itself does not handle the process of saving a file.

The SaveFileDialog object has properties for setting the initial appearance and functionality of the dialog box, a property for returning the filename selected by the user, as well as a method for showing the dialog box. The object does not itself save the file, but instead provides the information that allows your code to do this programmatically.

A SaveFileDialog object can be instantiated as follows:

Dim oSaveDlg As New SaveFileDialog

Selected SaveFileDialog Members

The following is a brief list of some of the more important members of the SaveFileDialog class:

AddExtension property

Gets or sets a Boolean value that determines whether the default file extension is automatically added to the FileName property if the user fails to enter an extension. Its default value is True.

DefaultExt property

Gets or sets a String that defines the default file extension. The string should consist of the file extension only, without a period.

FileName property

Gets or sets a String containing the name that the user selected or entered in the dialog box.

Filter property

Gets or sets a String containing the current filter, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

VB .NET Language in a Nutshell

VB .NET Language in a Nutshell

Steven Roman PhD, Ron Petrusha, Paul Lomax

Publisher Resources

ISBN: 0596003080Supplemental ContentCatalog PageErrata