OPEN_DIALOG_PIC

OPEN_DIALOG_PIC N

CREATES A SYSTEM OBJECT OPEN_DIALOG_PIC AND ALLOCATES IT NUMBER N AS REFERENCE

  • Type: Command
  • Parameter: 1
  • Group: System Objects Creation

ACTION

The command OPEN_DIALOG_PIC N creates a system object OPEN_DIALOG_PIC, and allocates it a number N. The number N will be used to designate the OPEN_DIALOG_PIC.

The created OPEN_DIALOG_PIC can then be used through the appropriated statements : FILTER, FILE_DIALOG, DIR_DIALOG or FILE_NAME$(N), but it is not visible.

An OPEN_DIALOG_PIC displays a dialog box to choose a file name with function FILE_NAME$(). The graphic file is displayed in the dialog box when selected. It can be opened or not. When it is opened, the function FILE_NAME$() returns its name.

An OPEN_DIALOG_PIC cannot generate an event.

Remark: by default, the OPEN_DIALOG_PIC is created on the FORM number 0, but another FORM can be used. For that, create a FORM by FORM N, and send it all the commands by COMMAND_TARGET_IS N before creating the OPEN_DIALOG_PIC.

SYNTAX: OPEN_DIALOG_PIC N

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.

USE

  • An OPEN_DIALOG_PIC makes the "Open File" common dialog box available to select a file name with function FILE_NAME$(), and displays the graphic selected file.

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is less than or equal to 0.
  • If number N is already used for a system object number.

EXAMPLE

rem create an OPEN_DIALOG_PIC

open_dialog_pic 1

rem then use it

a$=file_name$(1)

SEE ALSO

OPEN_DIALOG

SAVE_DIALOG

SAVE_DIALOG_PIC

FILE_DIALOG

FILE_NAME$()

FILTER

DIR_DIALOG