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

FormSaveAsFile

Displays a File Save As dialog box.

Syntax

FormSaveAsFile(sTitle, sFileName, sFilter [, sDefExt] )

sTitle:

A title to display at the top of the form.

sFileName:

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

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

sDefExt:

The file extension that will be used as a default when you use the FormSaveAsFile() function. If you do not specify a default extension, files will be saved without an extension.

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

FormOpenFile, FormSelectPrinter

Example

// Display the SaveAs dialog with the following filter list:
// All Files (*.*)
// Exe Files (*.EXE)
// Cicode Files (*.CI)
sFilename = FormSaveAsFile("Save As", "Alarms", "All Files (*.*)|*.*|Exe Files (*.EXE)|*.EXE|Cicode Files (*.CI)|*.CI|", "ci");

See Also

Form Functions