Displays a dialog box that prompts the user to select from a list of files and returns a String containing the full path of the selected file.
Comments
The SaveFilename$ function accepts the following parameters:
Parameter
Description
title$
String containing the title that appears on the dialog box's caption. If this string is omitted, then "Save As" is used.
extensions$
String containing the available file types. Its format depends on the platform on which the Basic Control Engine is running. If this string is omitted, then all files are used.
The SaveFilename$ function returns a full pathname of the file that the user selects. A zero-length string is returned if the user selects Cancel. If the file already exists, then the user is prompted to overwrite it.
e$ = "All Files:*.BMP,*.WMF;Bitmaps:*.BMP;Metafiles:*.WMF"
f$ = SaveFilename$("Save Picture",e$)
Example
This example creates a save dialog box, giving the user the ability to save to several different file types.
Sub Main()
????e$ = "All Files:*.BMP,*.WMF;Bitmaps:*.BMP;Metafiles:*.WMF"
????f$ = SaveFilename$("Save Picture",e$)
????If Not f$ = "" Then
????????Msgbox "User choose to save file as: " + f$
????Else
????????Msgbox "User canceled."
????End IF
End Sub