Problem:
Release 5.0:
Showing and hiding Windows when mixing graphical and character Screens.
When you are doing a phased conversion of a character based application to a GUI it is often useful to hide the character screen window so that the user cannot click in the character window when control is on a graphical window. If the user does this then the character portion of the application will not response as control is currently in the character screen.
Resolution:
If the application EXE is built as a "graphical" application or started using the RUNW trigger EXE (int or gnt code) then any character screen are run in the COBOL Text Window.
When the COBOL Text Window is used for character screens there is a runtime call PC_WIN_HANDLE that allows you to get the HWND windows handle. This allows you to manipulate the Window using standard Win32 api calls.
The ShowWindow api with the SW_HIDE flag can be used to hide the Text window when required and the SetForegroundWindow can be used to ensure that the Text Window is the highest in the Z-Order (ie the current window).
Attached is a demo that shows how to do this.
The demo has been written and tested using Net Express V5.