ObjectDCL Banner

Form_IsActive Method

Description

This method will return whether a dialog is active or not. All dialog boxes that are displayed are referenced in an active dialog list. To find out if a dialog box is active--as in the case where a secondary modeless dialog box has been closed by the user and you need to know if you should call the Form_Close method--use this method to query the active dialog list for the dialog box you need to ensure is present.

Parameters

MyDialogReference
Reference to the dialog.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.

Return Values

Returns the following according to the situation:

  • T is the form is active (created and visible).
  • Nil if the dialog is not found or not visible and not created.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Form_IsActive 
		MyDialogReference [as Reference])

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_IsActive
		ProjectFile [as String]
		DialogName [as String])

Applies For

ConfigTab, Dockable, FileDialog, Modal, Modeless.

Example

CopyCode imageCopy Code
; Check if the form is active
(Setq rValue (Odcl_Form_IsActive MyProject_MyForm))

See Also

Form_Close, Form_Hide, Form_Show