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


Displays a File Save As dialog box.


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


A title to display at the top of the form.


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


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

<File Type>|<Filter>|


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


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


// 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