Cicode Programming Reference > Cicode Function Categories > Form Functions Introduction > FormOpenFile

FormOpenFile

Displays a File Open dialog box.

Syntax

FormOpenFile(sTitle, sFileName, sFilter)

sFileName:

The name of the default file to display in the "File Name" field.

sTitle:

A title to display at the top of the form.

sFilter:

A file filter list to display in the "List Files of Type" field. The file filter list has the following format:

<File Type>|<Filter>|

where:

File Type is the text that displays in the drop-down box, for example All Files (*.*). Filter is the file type, for example *.CI

Return Value

The name and full path of the selected file (as a string) or an empty string ("") if the Cancel button is selected.

Related Functions

FormSaveAsFile, FormSelectPrinter

Example

// Display the Open File dialog with the following filter list:
// All Files (*.*)
// Exe Files (*.EXE)
// Cicode Files (*.CI)
sFilename = FormOpenFile("Open", "*.CI", "All Files (*.*)|*.*|Exe Files (*.EXE)|*.EXE|Cicode Files (*.CI)|*.CI|");

See Also

Form Functions