This documentation is archived and is not being maintained.

Visual Basic Reference

Visual Studio 6.0

BackStyle Property

See Also    Example    Applies To

Returns or sets a value indicating whether a Label control or the background of a Shape control is transparent or opaque.


object.BackStyle [= number]

The BackStyle property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
number A numeric expression specifying transparency, as described in Settings.


The settings for number are:

Setting Description
0 Transparent background color and any graphics are visible behind the control.
1 (Default) Opaque the control's BackColor property setting fills the control and obscures any color or graphics behind it.


You can use the BackStyle property to create transparent controls when you're using a background color on a Form object or PictureBox control or when you want to place a control over a graphic. Use an opaque control when you want it to stand out.

A control's BackColor property is ignored if BackStyle = 0.