Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using menu from modal form
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00458308
Message ID:
00673251
Vues:
69
Hi Fred,

I tried to do what you suggested and it did not work for me.
I have one main model form and entered the 2 lines in the GotFocus method and the menu options still were not available. I tried that either in VFP 6 or VFP 7. This main form is called from the main prg.

PUSH MENU _msysmenu
DO modal.mpr

Also the other suggestion worked if I let the Paint method to be fired all the time without the IF NOT this.lMenuDone.

Any ideas?

Regards,

Doron



>>>
>>>Add a property called lMenuDone to your modal form. This code in the form's Paint method:
>>>
>>>
>>>IF NOT This.lMenuDone
>>>   PUSH MENU _MSYSMENU
>>>   This.lMenuDone = .T.
>>>   DO MyMenu.prg
>>>   DO MyMenu.prg
>>>ENDIF
>>>
>>>
>>>Then you can issue a POP MENU in the form's Unload.
>>
>>Marcia,
>>
>>why i must run
>>
>>DO MyMenu.prg
>>
>>twice?
>>
>>One line seems to be sufficient.
>>Is it possible to use vfp standard _msysmenu (e.q.standard copy, edit,paste pads) ? I do'nt want to define new menu of each modal form.
>>
>>It it possible to run this code in some other event than paint (Load event)?
>>I haven't never used paint.
>
>You can put in your Form's GotFocus:
>
>PUSH MENU _msysmenu
>DO modal.mpr
>
>and in your Form's Unload:
>
>POP MENU _msysmenu
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform