From what thread are you doing this? If it's from another thread, I wouldn't
be surprised if it didn't work.
It's also possible that an event handler for the button is getting called
when you change the visibility state and, in there, it's setting the state
back to False.
Those are the two things that occur to me, anyway.
Paul T.
"TWischmeier" wrote:
> Hi,
>
> I encountered a strange problem where setting button.Visible = true
> has no effect. I can successfully get and set some other properties.
>
> Even if I debug to the point where I set that value and do a quick
> watch (Ctrl + Al+ Q) and execute those following two lines manually:
> btn2.Visible = true
> btn2.Visible
>
> it shows btn2.Visible being false. There is another button next to
> this one where it works without a problem. I cannot think of any
> reason why this occurs, so I am glad for any help.
> .
>
|