<- Back to CNS Image function list
CNSImage_File_SelectFileWithDialog
- Description
The CNSImage_File_SelectFileWithDialog function allows you to use a dialog to locate a file on your hard drive and returns the path of the chosen file. You can specify the starting folder by specifying the optional "StartPath" parameter. You can also display a message in the dialog by using the optional "Prompt" parameter.
- Return Type
- Text
- Format
- CNSImage_File_SelectFileWithDialog ( StartPath ; Prompt )
- Optional Parameters
- StartPath
The Path to the Folder to display when the dialog first opens.
- Prompt
An optional Prompt or Message to display on the dialog.
- StartPath
- Related Items
- CNSImage_Export, CNSImage_File_Copy, CNSImage_File_Delete, CNSImage_File_Exists, CNSImage_File_GetPath, CNSImage_File_SelectFolderWithDialog, CNSImage_Import, Reference: Paths
- Examples
Example 1
Code:
CNSImage_File_SelectFileWithDialogResult:
A dialog is shown to choose a file.Example 2
Code:
CNSImage_File_SelectFileWithDialog("";"Please choose a JPG image:")Result:
A dialog is shown to choose a file with the prompt: "Please choose a JPG image:".