controls [Windows Forms], making invisible at run time
invisible controls
user controls [Windows Forms], invisible
custom controls [Windows Forms], invisible
run time [Windows Forms], making controls invisible
69eb2e72-32f5-4f79-a157-c2c5f60c1628
How to: Make Your Control Invisible at Run Time
There are times when you might want to create a user control that is invisible at run time. For example, a control that is an alarm clock might be invisible except when the alarm was sounding. This is easily accomplished by setting the xref:System.Windows.Forms.Control.Visible%2A property. If the xref:System.Windows.Forms.Control.Visible%2A property is true, your control will appear as normal. If false, your control will be hidden. Although code in your control may still run while invisible, you will not be able to interact with the control through the user interface. If you want to create an invisible control that still responds to user input (for example, mouse clicks), you should create a transparent control. For more information, see Giving Your Control a Transparent Background.
' To set the Visible property from within your object's own code.
Me.Visible=False' To set the Visible property from another object.
myControl1.Visible=False
// To set the Visible property from within your object's own code. this.Visible=false;// To set the Visible property from another object. myControl1.Visible=false;