Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referencing a form from a menu - newbie question
Message
 
À
21/09/2004 07:10:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00944466
Message ID:
00944475
Vues:
16
cetin,

thanks for the reply but it is still not clear. if i change my code to this, i still get an error:

? wexist('gform') &&returns .t.
show window gform
gform.visible = .f.

however your "show window" hint led me to "activate window" if i use this code, it works now:

? wexist('gform') &&returns .t.
activate window gform
gform.visible = .f.

is that okay?

n.


>>i have a menu option with two lines of code
>>
>>? wexist('gform') &&returns .t.
>>gform.visible = .f. &&returns error "object gform is not found"
>>
>>not sure why that second line does not work if the form exists. how do i manipulate the form properties from within the menu? when i ran the form i am using "do form gform name gform"
>>
>>thanks,
>>
>>n.
>
>Nancy,
>2 parts.
>1) wexist('gform') is not a verifier for gform is there as an object.
>
>? wexist('gform') &&returns .t.
>show window gform
>
>2) If you use do form with name clause then be sure the 'name' is in scope later when it's called. It's like any other variable and has the same scoping rules.
>
>public gForm
>do form name gForm
>
>would make it work BUT public variables are not suggested. Create a single custom object on your app on entry and save things that should persist there.
>
>When you use that also change your code to:
>
>if type('gForm.Visible')='L'
> gForm.Visible = .f.
>endif
>
>PS: You might need extra checks if it's a form.
>Cetin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform