Share via


Common Dialog Box Foundation Class

You can use system Open and Save file dialog boxes that mimic the latest Windows ones in your applications. For example, you can have a Places bar on the left side of the dialog box.

Category

System Dialog boxes

Default Catalog

Visual FoxPro Catalog\Foundation Classes\Dialogs

Class

_comdlg

Base Class

Custom

Class Library

_system.vcx

Parent Class

_custom

Sample

...\Samples\Solution\Ffc\Getfilex.scx

Remarks

To use, drop the class on a project or form or, from the Component Gallery Item shortcut menu, select Add to Project or Add to Form. When you add the class to a form, Visual FoxPro places the class icon on the form. You can specify the appropriate property values and provide any necessary input and output objects. When you drop the class on a project, you can choose between adding the class, or creating a subclass.

See Guidelines for Using Visual FoxPro Foundation Classes for more information on using foundation classes.

Properties, Events, Methods

Description

aFileNames array

Array of filenames returned from dialog box.

Default: .F.

aFileList array

Array of file extension filters passed to dialog box.

Default: .F.

cCustomFilter property

Custom filter the user created while using dialog box.

Default: none

cDefaultExtension property

Default file extension to display.

Default: none

cFileName property

Name of file selected or initially set as default.

Default: none

cFilePath property

Path from which files were selected.

Default: none

cFileTitle property

File title property of the selected file(s).

Default: none

cInitialDirectory property

Initial directory from which to display files.

Default: none

cTitleBar property

Caption for dialog box title bar.

Default: none

lAllowMultiSelect property

Specifies whether to allow multiple files.

Default: .F.

lFileMustExist property

Specifies whether to allow only existing files to be entered.

Default: .F.

lHideReadOnly property

Specifies whether to hides read-only files from list.

Default: .T.

lNewExplorer

Specifies whether to use new explorer user interface and features such as Places bar.

Default: .T.

lNoChangeDir property

Specifies whether to prevent changing of displayed directory.

Default: .F.

lNoNetworkButton property

Specifies whether to prevent including a network button in the dialog box.

Default: .F.

lNoPlacesBar property

Specifies whether to prevent a Places bar in the dialog box.

Default: .F.

lNoValidate property

Specifies that files are not validated in the dialog box.

Default: .F.

lSaveDialog box property

Specifies whether to use Save dialog box instead of Open one.

Default: .F.

nFileCount property

Specifies the number of files selected from the dialog box.

Default: 0

nFilterIndex property

Specifies which of the filters were selected from the dialog box.

Default: 0

AddFilter method

Specifies the file extension filters to use when displaying the dialog box.

Syntax: AddFilter(cDescription, cSkeleton)

Return: none

Arguments:

cDescription provides a description of the filter.

cSkeleton specifies the file extension filter skeleton.

ClearFilters method

Clears all file extension filters.

Syntax: ClearFilters( )

Return: none

Arguments:

cUser specifies name of user to check

ShowDialog box method

Displays dialog box with various options such as filters.

Syntax: ShowDialog box( )

Return: none

Arguments: none

TestDialog box method

Test script for displaying a dialog box.

Syntax: TestDialog box( )

Return: none

Arguments: none

See Also

Concepts

Guidelines for Using Visual FoxPro Foundation Classes

Reference

Visual FoxPro Foundation Classes A-Z

Other Resources

Foundation Class Samples