ObjectDCL Banner

Form_Show Method

Description

This method displays a dialog box that has already been loaded, to the screen. This method auto detects the style of the dialog box and displays it in the correct mode.

Parameters

MyDialogReference
Reference to the dialog.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
UpperLeftXCoordinate
Integer identifying the X-axis position in pixels to apply to the left side.
UpperLeftYCoordinate
Integer identifying the Y-axis position in pixels to apply to the top side.

Return Values

Returns the following according to the situation:

  • T when successful.
  • String when successful and a file has been selected in the FileDialog.
  • List of strings when successful and more than one file has been selected in the FileDialog.
  • Nil if the form is not found or the form does not support the operation.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Form_Show 
		MyDialogReference [as Reference]
		[Optional] UpperLeftXCoordinate [as Integer]
		[Optional] UpperLeftYCoordinate [as Integer])

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Form_Show
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		[Optional] UpperLeftXCoordinate [as Integer]
		[Optional] UpperLeftYCoordinate [as Integer])

Remarks

The optional upper left coordinates only affect modal and modeless dialog boxes only.

If the dialog box being shown is a modal dialog box, this method will wait until the user has exited the dialog box before AutoLisp will be allowed to continue on (for AutoCAD 2000 and later).

Do not call this method from within a OnMouseDown event of any control. Microsoft's underlying technology requires the OnMouseUp event and this will not happen if this method is called from a OnMouseDown event. What goes down must come up, and calling this method will fire the OnMouseUp event to the new dialog box causing an error.

Applies For

Dockable, FileDialog, Modal, Modeless.

Example

CopyCode imageCopy Code
; Center the dialog
(Odcl_Form_Show MyProject_MyForm)

See Also

Form_Center, Form_Close, Form_CloseAll, Form_Enable, Form_Hide, Form_IsActive, Form_Resize, Form_SetDialogMinMaxSizes