By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,669 Members | 1,540 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,669 IT Pros & Developers. It's quick & easy.

Control.Hide(), How to query for hidden.

P: n/a
Hi,

How can I query a Windows.Form control if it is hidden or not.

I would like to toogle Hide/Show and not use a bool as control variable for
this but simply query the form werther or not its hidden.

regards than thanks
Jesper.
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
How can I query a Windows.Form control if it is hidden or not.

The Visible property of the control.

Two places to look for this information in the future:

1) MSDN:

http://msdn.microsoft.com/en-us/libr...trol.hide.aspx

"Hiding the control is equivalent to setting the Visible property to
false. After the Hide method is called, the Visible property returns a
value of false until the Show method is called."

2) If MSDN doesn't have the information you need, try Reflector:

http://www.aisto.com/roeder/dotnet/

....which will give you this as the reflected method body of Hide()

public void Hide()
{
this.Visible = false;
}
Jun 27 '08 #2

P: n/a
On Jun 26, 4:36*am, Jesper, Denmark
<JesperDenm...@discussions.microsoft.comwrote:
Hi,

How can I query a Windows.Form control if it is hidden or not.

I would like to toogle Hide/Show and not use a bool as control variable for
this but simply query the form werther or not its hidden.

regards than thanks
Jesper.
Hi,

How do you set it as Visible or Hidden in the first place?
answer:
The only way is setting Visible to true/false
so you have to check the value of this property
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.