PRB: Using SHOW(1) Does Not Make a Form in a Formset ModalLast reviewed: April 30, 1996Article ID: Q130308 |
The information in this article applies to:
SYMPTOMSIf you use the SHOW method to make one form of a formset modal, the form remains a modeless form. If you make a form modal, the user should not be able to move to any other window in the application. A modeless form allows the user to click any other form in the application. Modal forms are used to display custom dialogs, warnings, or error messages.
CAUSEThis is by design. The SHOW method affects the modality of the entire formset. You cannot use the SHOW method to make one form within a formset modal. You must make the entire formset modal.
RESOLUTIONThe easiest way to handle modal forms is to make them separate form files, instead of part of a formset. The following steps create two forms. When a command button on the first form is clicked, the second form appears. The user cannot activate the other window until the command button on the second form is clicked.
If you click the command button, the form named frmModal should appear. You should not be able to click into the Command or View windows, and most menu options should be grayed out. If you click the command button on the second form, the form should disappear. The form named frmModLs should reappear, and you should once again be able to activate other windows.
STATUSThis behavior is by design.
MORE INFORMATIONIf you want to use the SHOW method to display a modal formset, you must set the modality of the entire formset as follows:
THISFORMSET.SHOW(1) && to make the formset modalThis code may be placed in the Init method of the Formset or within the click event of a command button depending on where or when a modal screen set is needed. The formset's WindowType property may also be used.
REFERENCESFor more information on using the SHOW method, please search the topics in the Help file.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |