PC Review


Reply
Thread Tools Rate Thread

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

 
 
Jesper, Denmark
Guest
Posts: n/a
 
      26th Jun 2008
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.
 
Reply With Quote
 
 
 
 
Mick Wilson
Guest
Posts: n/a
 
      26th Jun 2008
> 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;
}


 
Reply With Quote
 
Ignacio Machin ( .NET/ C# MVP )
Guest
Posts: n/a
 
      26th Jun 2008
On Jun 26, 4:36*am, Jesper, Denmark
<JesperDenm...@discussions.microsoft.com> wrote:
> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden folders questions - can I hide a hidden folder? Will Windows XP General 10 4th Oct 2009 11:11 PM
using a form to control show hide fields in a query =?Utf-8?B?RGF3blRyZWFkZXI=?= Microsoft Access 5 17th Sep 2009 03:52 PM
Hidden folders don't (un)hide Ray Windows Vista File Management 4 13th Mar 2008 12:49 AM
Hide a Folder Only if it's not Hidden Already =?Utf-8?B?RG9uYWxkIEZpc2hlcg==?= Windows XP Performance 1 6th Aug 2007 07:31 AM
Can't hide hidden form =?Utf-8?B?SmltIFNob3Jlcw==?= Microsoft Access Form Coding 1 27th Jun 2004 05:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:19 PM.