Visual Basic Reference

Visible Property

See Also    Example    Applies To

Returns or sets a value indicating whether an object is visible or hidden.

Syntax

object.Visible [= boolean]

The Visible property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
boolean A Boolean expression specifying whether the object is visible or hidden.

Settings

The settings for boolean are:

Setting Description
True (Default) Object is visible.
False Object is hidden.

Remarks

To hide an object at startup, set the Visible property to False at design time. Setting this property in code enables you to hide and later redisplay a control at run time in response to a particular event.

Note   Using the Show or Hide method on a form is the same as setting the form's Visible property in code to True or False, respectively.