Problem:
When a Dialog System program is busy, it does not accept input from the keyboard or mouse clicks. This can be shown very easily by changing the default arrow-like shape of the mouse pointer to an hourglass shape, which users are generally familiar with, and changing it back when the control flow returns to the Dialog System.
Resolution:
The Dialog System function to accomplish this is the SET-MOUSE-SHAPE function. It does this when the following lines are included in your dialog:
SET-MOUSE-SHAPE $WINDOW "SYS-Wait"
RETC
SET-MOUSE-SHAPE $WINDOW "SYS-ARROW"
or
SET-MOUSE-SHAPE $WINDOW "SYS-Wait"
CALLOUT "MyProgram" 3 MyParameter
SET-MOUSE-SHAPE $WINDOW "SYS-ARROW"
The attached demo shows the use of both of these methods. In the BUTTON-SELECTED event of the first button, a RETC is used and the COBOL program waits 5000 milliseconds while showing the hourglass shape, which is called SYS-Wait.
The BUTTON-SELECTED event of the second button displays all directly available system shapes one after the other. A CALLOUT is used to wait 2000 milliseconds.
Available in a Net Express installation
The list of "System Mouse Pointer Shape Labels" can be found within the Net Express product in the file:
<Net Express>\\Base\\SOURCE\\PAN2LINK.CPY
A demo covering how to change the mouse pointer using the MOUSE-OVER event can be found within the Net Express product at:
<NetExpress>\\DialogSystem\\Moudemo
It also demonstrates how to use shapes located in a resource DLL.
Other possibilities to show "busy"
As an alternative to changing the mouse pointer, especially if the waiting period lasts for more than a few seconds, Dialog System offers a progress indicator. The progress indicator demo can be found among the installed Net Express demos in:
<Net Express>\\DialogSystem\\COMMONCONTROLS\\Progress