Description: | Opens (shows) a form in "Modeless" mode. "Modeless" means that the parent form is active after opening the child form. It is different from the CallForm2 (CallForm) method in that control is returned to the code immediately after opening the child form. The child form cannot be re-opened until it is closed. |
Used in controls: | None. |
Used in objects: | Form |
Parameters: | VT_BSTR - FormNameX(8192) [VT_BSTR - DllNameX(8192) [VT_I4 - CookieS9(9) COMP-5] |
Description of Parameters: | FormName: The name of the form to be opened. DllName: When the form is a DLL, defines the name of the DLL file containing the form. Cookie: An integer that distinguishes the opened form. Note that the order of parameters is different from the order of OPENSHEET's parameters. |
Return value: | VT_I4 - ReturnValueS9(9) COMP-5 Zero indicates normal completion. |
DLL Search Path: | When the DllName Parameter does not contain the full path, PowerCOBOL searches for the DLL in folders in the following order: 1. The folder containing the execution file. |
Example: | 1. To open a form called "Subform1" contained in the same DLL module you would code: WORKING-STORAGE SECTION. 01 Subform1-ID PIC S9(9) COMP-5 VALUE 1. PROCEDURE DIVISION. INVOKE POW-SELF "OpenForm" USING "SubForm1" Subform1-ID SET Subform1-Open TO TRUE Where Subform1-Open is a global item 2. To open a form called "Subform2" contained in a DLL called "SubForm2.DLL" you would code: WORKING-STORAGE SECTION. 01 Subform2-ID PIC S9(9) COMP-5 VALUE 2. PROCEDURE DIVISION. INVOKE POW-SELF "OpenForm" USING "SubForm2" "SubForm2.DLL" Subform2-ID |
Backward compatibility | OPENSHEET |
Backward compatibility | 1. X(260) - DLL name |