PRB: Using SHOW(1) Does Not Make a Form in a Formset ModalID: Q130308 3.00 WINDOWS kbtool kbprb 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. 1. Create a form called frmModls. Add a label to the form that has the 2. Save the first form. Create a second form called frmModal. Add a label
3. Save and close the form. Then type the following command in the Command
When the form appears, you should be able to access menu options such as
Cut, Copy, and Paste from the Edit menu, and click into other windows such
as the Command Window or View Window.
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:
This 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 KBCategory: kbtool kbprb KBSubcategory: FxtoolFormdes
|
Last Reviewed: May 1, 1996 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |