Opens a form as a modal window and returns an optional value.

Syntax

<oRef>.readModal( )

<oRef>

The form to open.

Property of

Form

Description

Use the readModal( ) method to open a form as a modal window. A modal window has the following characteristics:

While the form is open, focus can't be transferred to other forms.

Execution of the routine that opened the form stops until the form is closed. When the form is closed, control transfers to the statement after the one that opened the form.

The form’s close( ) method takes an optional parameter. If the form is closed with a parameter, the value of that parameter is returned by readModal( ). Otherwise readModal( ) returns false.

Many applications use modal forms as dialog boxes, which typically require users to take an action before the dialog box can be closed.

You can't open a form with the readModal( ) method when the MDI property is set to true.

To open a form as a modeless window, use the open( ) method.