Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.11 CallForm2 Method

Description:

Opens (Shows) a form in "Modal" mode, taking an extra, modal style, parameter to the CallForm method.

"Modal" means that the parent form is inactive until the child form is closed. The child form looks like a dialog box.

It is different from the OpenForm method in that control is returned after all the child form's procedures have completed.

The child form cannot be re-opened if the child form is already open.

Used in controls:

None.

Used in objects:

Form

Parameters:

1. VT_BSTR - FormNameX(8192)
2.[VT_BSTR - DllNameX(8192)]
3.[VT_I4 - CookieS9(9) COMP-5]
4.[VT_I4 - ModalStyleS9(9) COMP-5]

Description of Parameters:

FormName: The name of the form to be opened.

DllName: When the form is in a DLL file, defines the name of the DLL file containing the form.
It should be omitted when you specify a form in the same Module, as specifying the same DLL name that contains the invoking form degrades performance.

Cookie: An integer to distinguish the opened form.
It is set in a parameter of the CloseChild
event when the opened form is closed. If omitted, the parameter value is zero.

ModalStyle: A modal style. Either:
POW-MODALSTYLE-APPLICATIONMODAL:
Only the parent form is inactive.
or:
POW-MODALSTYLE-TASKMODAL: (Default)
All forms in the same thread, except the opened form, are inactive.

Return value:

VT_I4 - ReturnValueS9(9) COMP-5

This is the value set in the Result parameter when the CloseForm method is invoked.
When you omit the parameter, or the form is closed in some way other than by invoking methods, the value is zero. Otherwise, if the form was not closed for any reason, the value is -1.

DLL Search Path:

When the DllName parameter does not contain the full path, PowerCOBOL searches for the DLL folders in the following order:

1. The folder containing the execution file.
2. The current folder
3. The system folder of 32 bit Windows
4. The system folder of 16 bit Windows
5. The folder in which Windows is installed.

6. The folders of the PATH environment variable.

Backward compatibility
method name:

None.