Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Menus and modal forms
Message
De
30/05/1997 13:47:51
Bob Lucas
The WordWare Agency
Alberta, Canada
 
 
À
29/05/1997 15:31:39
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00034148
Message ID:
00034280
Vues:
32
>I have a modal form on a modal formset. From the load of the form I say DO MyMenu.mpr. The menu comes up but all the options are disabled. If I change the formset to Modeless the menu works, but I need it to be modal. How can I get the menu to work?
>
>Thanks
>Elyse


Rainer Becker, who is a very entertaining Foxpro speaker, recommends that you Never use modal forms. Of course, there is often a need for modal forms! I believe that his approach is to have a flag in the global application object (or a global variable, if you will) that indicates if the current form is supposed to be modal or not. The init of the form automatically sets this flag to the appropriate value.
In his menus, there is a skip for clause based on the value of this flag. I think the deactivate of the form also uses the flag (don't allow a deactivate if the flag is set). There is the appearance of a modal without it actually being modal. This way, menu options that should be accessible even with a modal form can still be available. A menu that belongs to a modal form can be available because there is no skip for setting! I think this is part of his base framework, but implementation is very simple and straightforward.

(I have plenty of time this morning to write long replies because I installed a VFP 5.0a application on a Windows NT 4.0 server two days ago. Since the application uses a treeview control I needed to update COMMCTL32.OCX. This did not register properly when setup was run (and the form gave an OLE error) so I manually ran REGSVR32 to register the OCX. This worked fine and the form worked as expected. Of course I didn't know that Windows NT would never boot again. But hey, how hard can it be to fix a minor OCX problem in NT 4.0?)

Bob
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform