The user can temporarily suspend a window to process another window, if the currently active window has the MOU_MODAL option set to OFF.
Caution: Making a form, menu or window non-modal is not as simple as toggling this option. Changes must be made in the way the form or window is processed. See Chapter 30, "Differences in Non-Modal Form Processing," for more information.
To activate another window, the user clicks the mouse anywhere in the new window. The following actions occur:
| 1 | If the user is suspending a data entry form, the current field is validated to ensure that it contains valid information. Field validation includes the system validation function, range checking, and any user validation function installed for the field. The end-field function is not called since the user is suspending the field, not actually leaving it. The field is redisplayed with the inactive attribute. |
| 2 | The action code for this form, menu or window is set to AC_FMSUSPEND. If you have installed a suspend function for this window, it is called. |
| 3 | Vermont Views brings the new window to the top of all windows on the screen. Vermont Views keeps track of which windows are on top of other windows. If the window to be activated is hidden beneath other windows, it is brought to the top and is re-displayed on the screen. The relative order of all other windows remains unchanged. |
| 4 | If installed, the activate function on the new window is called to perform initialization such as initializing event tables, or changing the border to indicate which window is active. |
| 5 | If the new window is a simple window (not a data form or menu form), and the CSRPLACE option is ON for the window, Vermont Views places the cursor at the mouse location. If CSRPLACE is OFF, the cursor is not moved. |
| 6 | If the new window is a data form or menu form, and this form or menu has not been processed previously, the begin-form function is called for the form (if one is installed). |
| 7 | If the new window is a data form or menu form, and the user clicked inside the form but not on a particular field, the cursor is placed in the field that was active when the form was suspended. Since the end-field function for that field was not called when the form was suspended, the begin-field function is not called when returning to that field.
If this is the first time the form has been activated, the cursor is placed in the first field on the form, and the begin-field function for that field is called (if one is installed). The new field is displayed with the active video attribute. |
| 8 | If the new window is a data form or menu form, and the user clicked inside a specific field, Vermont Views moves the cursor to that field.
If this form has previously been suspended, and the user did not click inside the field that was active when the form was suspended, the end-field function for the previously active field is called. The begin-field function for the new field is then called. If this is the first time the form has been activated, the begin-field function for the specified field is called. The new field is displayed with the active video attribute. |
Switching between forms, menus or windows is not allowed when MOU_MODAL is set to ON for the current window. If the MOU_MODQUIT option is ON, clicking in any window other than the current window will terminate processing of the current window. Otherwise, clicking in any window other than the current window will sound the beep.