General information
Category:
Forms & Form designer
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only