Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Accessing method through menu
Message
De
03/06/2004 03:03:04
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
 
À
03/06/2004 02:17:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Divers
Thread ID:
00909472
Message ID:
00909477
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
I also use top level forms.
At the beginning of app, I store a reference into an application object property. Then is possible to call form methods using that reference
In init()
oApp.MainFormRef = this
then you can
oApp.MainFormRef.ChangeHeading()
Or use a global variable which store top level reference

>I have designed a menu with the menu builder. From my top level for, I am activating this menu with
>
>DO gl_menu.mpr WITH THISFORM, "MainMenu", .T.
>
>Upon selecting the menu item, I want to access a method written in the top level form. If I write the procedure code for the menu item as
>THISFORM.ChangeHeading
it says ‘THISFORM can not be used within the method’.
>What do I need to do access a form method or any other control on the form?
>
>Thanks in advance.
>Yashodhan.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform