Compartir a través de


SimpleShape.BackColorChanged (Evento)

Tiene lugar cuando cambia la propiedad BackColor de la forma.

Espacio de nombres:  Microsoft.VisualBasic.PowerPacks
Ensamblado:  Microsoft.VisualBasic.PowerPacks.Vs (en Microsoft.VisualBasic.PowerPacks.Vs.dll)

Sintaxis

'Declaración
<BrowsableAttribute(True)> _
Public Event BackColorChanged As EventHandler
[BrowsableAttribute(true)]
public event EventHandler BackColorChanged
[BrowsableAttribute(true)]
public:
 event EventHandler^ BackColorChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member BackColorChanged : IEvent<EventHandler,
    EventArgs>
JScript no admite eventos.

Comentarios

Este evento se produce si el BackColor propiedad se modifica mediante programación o por la interacción del usuario.

Para obtener más información acerca de cómo controlar eventos, vea Controlar y provocar eventos.

Ejemplos

En el ejemplo siguiente se muestra cómo responder a la BackColorChanged evento en un controlador de eventos. Este ejemplo requiere que haya un RectangleShape control denominado RectangleShape1 en un formulario.

Private Sub RectangleShape1_BackColorChanged(
  ) Handles RectangleShape1.BackColorChanged

    ' The BackStyle must be Opaque or the BackColor has no effect. 
    If RectangleShape1.BackStyle = BackStyle.Transparent Then
        RectangleShape1.BackStyle = BackStyle.Opaque
    End If 
End Sub
private void rectangleShape1_BackColorChanged(object sender, System.EventArgs e)
{
    // The BackStyle must be Opaque or the BackColor has no effect. 
    if (rectangleShape1.BackStyle == BackStyle.Transparent)
    {
        rectangleShape1.BackStyle = BackStyle.Opaque;
    }
}

Seguridad de .NET Framework

Vea también

Referencia

SimpleShape Clase

Microsoft.VisualBasic.PowerPacks (Espacio de nombres)

Otros recursos

Introducción a los controles de líneas y formas (Visual Studio)

Cómo: Dibujar líneas con el control LineShape (Visual Studio)

Cómo: Dibujar formas con los controles OvalShape y RectangleShape (Visual Studio)