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


Displays a File Open dialog box.


FormOpenFile(sTitle, sFileName, sFilter)


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


A title to display at the top of the form.


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

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


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