Important: You do not have the latest version of CIMPLICITY! You are missing out on the newest capabilities and enhanced security. For information on all the latest features, see the CIMPLICITY product page. For more information on upgrades, contact your GE Digital sales agent or e-mail GE Digital Sales Support. For the most up-to-date documentation, go here.
OpenFilename$ (function)
Syntax
OpenFilename$[([title$ [,extensions$]])]
Description
Displays a dialog box that prompts the user to select from a list of files, returning the full pathname of the file the user selects or a zero-length string if the user selects Cancel.
Comments
This function displays the standard file open dialog box, which allows the user to select a file. It takes the following parameters:
Parameter
Description
Title$
String specifying the title that appears in the dialog box's title bar. If this parameter is omitted, then "Open" is used.
Extension$
String specifying the available file types. If this parameter is omitted, then all files are displayed.
e$ = "All Files:*.BMP,*.WMF;Bitmaps:*.BMP;Metafiles:*.WMF"
f$ = OpenFilename$("Open Picture",e$)
Example
This example asks the user for the name of a file, then proceeds to read the first line from that file.
Sub Main
Dim f As String,s As String
f$ = OpenFilename$("Open Picture","Text Files:*.TXT")
If f$ <> "" Then
Open f$ For Input As #1
Line Input #1,s$
Close #1
MsgBox "First line from " & f$ & " is " & s$
End If
End Sub