Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trying to access object on form from a menu
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040403
Message ID:
00040458
Vues:
28
>>Hi Vladimir,
>>
>>Thanks for the response! From my menu I was starting the form using DO FORM formname. When I used this the app object was not adding the form to the array (but I still can't figure out why the form object wasn't available elsewhere). I changed my menu command to goApp.DoForm("formname") and now the form is added to the array and available to my code.
>>
>>Jeff
>>
>>>Hi Jeff!
>>>
>>>I've traced some days ago how works an app object. When you open form then
>>>an app object refresh his form collection and add new member to form's
>>>array. When you close form then app objects refresh form's collection and
>>>renumber all members. That's why you can't got an reference by your way....
>>>
>>>Have a happy day
>>>Vladimir Shevchenko
>>>
>>>> IF goApp.MainMenuVisible = .T.
>>>> goApp.aForms(1).chkPrintPreview.Value = 0
>>>> ENDIF
>>>>
>>>> But if the form is closed and then later reopened, I get an error:
>>>Unknown
>>>> Member aForms.
>
>Hi Jeff,
>
>You can also run your forms using DO FORM myForm NAME MyFormName, and then address your form controls using that name.

Hi Nick,

Oh cool, thanks for the response!

Jeff
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform