Form-Show

Function Name dcl-Form-Show
Syntax   (dcl-Form-Show <CONTROL> {PositionX [as Long]} {PositionY [as Long]})
Syntax  
(File Dialog)
(dcl-Form-Show <CONTROL> {InitialDirectory [as String]} {InitialFilename [as String]} {DefaultExtension [as String]})
Return Type Long, String, or List of Strings
Applies To Control Bar, File Dialog, Modal Dialog, Modeless Dialog, Palette

This method instantiates a new OpenDCL dialog form. If the optional PositionX and PositionY arguments are included, the form's initial position is at PositionX, PositionY (specified in parent window client coordinates). File dialogs use an alternate syntax, with optional arguments for the initial directory, initial filename, and default file extension, respectively.

If the specified form is a modal dialog, this function does not return until the dialog is closed, and it returns a long value that indicates the dialog status. If a dialog is cancelled (e.g. by pressing [Esc]), the return value is 2; if it is closed by pressing [Enter], the return value is 1. Other values may be returned by calling Form-Close from an event handler and specifying a custom dialog status.

If the specified form is any type of modeless dialog, this function returns immediately, and it returns a dialog identifier that is incremented every time a new dialog is created.

If the specified form is a file dialog, this function does not return until the dialog is closed. If the file dialog allows multiple selection, it returns a list of selected filenames; otherwise it returns the single selected filename as a string.