Return to the technote repository Modal
Dialog boxes

Windows

Windows provide a "modal" behavior for dialog boxes. It means that when a modal dialog box is open, you can only click in this box, not on any other window of the application.

To retrieve this behavior in Magic, you can call a Windows dialog box (using calldll or GET.DLL for common dialog boxes).

Magic 9 natively offers a parameter to make a window modal.

Magic

This modal dialog box sample shows you how to make a modal dialog box in Magic.

It is based on the "verify" operation. If the verify operation is placed in the record suffix, and is the operation has the "error" option, then the engine come back to the record main. In order to the record suffix to always execute, the "Force record suffix" flag is set to "Yes".