Forms created in ATEasy can be created as modal or modeless. A modal form must be closed or dismissed before you can continue working with the rest of the application forms. A modeless form has no such requirement; you can shift focus to another form window or the ATEasy application without concerning yourself with the modeless form.
In Windows, the default behavior is modal for dialog boxes. For example, the frequently encountered dialog box which requires you to click "OK" or "Cancel" is by definition modal. Likewise, in ATEasy, the default is modal for forms.
In ATEasy, forms can be declared to be modal or modeless when they are loaded -- when they are loaded and instantiated from within a procedure.
The syntax for specifying the modality of a form is:
load frmVariable [, bModal, [hwndParent]]
where frmVariable is the name of the form to be loaded.
The next parameter, bModal, which is optional, is a Bool value (True or False). The Boolean value is what determines whether the loaded form is modal or not. The default, if the value is omitted, is True, meaning that the form will be modal.
The final, optional parameter, hwndParent, is the handle -- the number which is used to identify a window in the Windows operating system -- of a window which will be considered to be the "parent" or "owner" of the form being loaded. If the "parent" window is closed, the form window will disappear as well.
A modeless form needs some additional code to keep it open. Otherwise, it will close as soon as it is loaded. Here is an example of the additional code:
while (frmModeless.hwnd)
endwhile
From a user's point of view, the important feature of modality is that you can declare as modal a form or pop-up form which requires user input or attention.
For more examples of loading modal and modeless forms, please see examples in Load Statement.