SimpleShape.BackColorChanged Event


Occurs when the BackColor property of the shape is changed.

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

public event EventHandler BackColorChanged

This event is raised if the BackColor property is changed by either a programmatic modification or user interaction.

For more information about how to handle events, see Handling and Raising Events.

The following example shows how to respond to the BackColorChanged event in an event handler. This example requires that you have a RectangleShape control named RectangleShape1 on a form.

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;
Return to top