Propriedade SimpleShape.BackStyle

Obtém ou define a transparência da forma.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (em Microsoft.VisualBasic.PowerPacks.Vs.dll)

Sintaxe

<BrowsableAttribute(True)> _
Public Property BackStyle As BackStyle

Dim instance As SimpleShape
Dim value As BackStyle

value = instance.BackStyle

instance.BackStyle = value
[BrowsableAttribute(true)]
public BackStyle BackStyle { get; set; }
[BrowsableAttribute(true)]
public:
property BackStyle BackStyle {
    BackStyle get ();
    void set (BackStyle value);
}
public function get BackStyle () : BackStyle
public function set BackStyle (value : BackStyle)

Valor de propriedade

Tipo: Microsoft.VisualBasic.PowerPacks.BackStyle
Um dos valores de BackStyle (Opaque ou Transparent). O padrão é Transparent.

Comentários

Quando o BackStyle propriedade estiver definida como Transparent (padrão), o BackColor propriedade não terá efeito.

Configurando o BackgroundImage ou FillStyle propriedade substitui a configuração de BackStyle.

Exemplos

O exemplo a seguir mostra como usar o BackStyle propriedade para comutador entre uma forma transparente e opaca. Este exemplo requer que você tenha um OvalShape controle chamado OvalShape1 em um formulário.

PrivateSub OvalShape1_Click(ByVal sender As System.Object, _
 ByVal e As System.EventArgs) Handles OvalShape1.Click
    ' Change between transparent and opaque.If OvalShape1.BackStyle = PowerPacks.BackStyle.Transparent Then
        OvalShape1.BackStyle = PowerPacks.BackStyle.Opaque
        OvalShape1.BackColor = Color.LimeGreen
    Else
        OvalShape1.BackStyle = PowerPacks.BackStyle.Transparent
    EndIfEndSub
privatevoid ovalShape1_Click(System.Object sender, System.EventArgs e)
{
    // Change between transparent and opaque.if (ovalShape1.BackStyle == BackStyle.Transparent)
    {
        ovalShape1.BackStyle = BackStyle.Opaque;
        ovalShape1.BackColor = Color.LimeGreen;
    }
    else
    {
        ovalShape1.BackStyle = BackStyle.Transparent;
    }
}

Permissões

Consulte também

Referência

SimpleShape Classe

Membros SimpleShape

Namespace Microsoft.VisualBasic.PowerPacks

Outros recursos

Introdução à linha e controles de forma (Visual Studio)

Como: Desenhar linhas com o Controlarar de LineShape (Visual Studio)

Como: Desenhar formas com a OvalShape e controles de RectangleShape (Visual Studio)