Compartilhar via


SimpleShape.BackgroundImageChanged Event

Occurs when the BackgroundImage property of a shape is changed.

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

Syntax

'Declaration
<BrowsableAttribute(True)> _
Public Event BackgroundImageChanged As EventHandler
[BrowsableAttribute(true)]
public event EventHandler BackgroundImageChanged
[BrowsableAttribute(true)]
public:
 event EventHandler^ BackgroundImageChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member BackgroundImageChanged : IEvent<EventHandler,
    EventArgs>
JScript does not support events.

Remarks

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

For more information about how to handle events, see Consuming Events.

Examples

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

Private Sub RectangleShape1_BackgroundImageChanged(
  ) Handles RectangleShape1.BackgroundImageChanged

    ' Display a message in the Label.
    Label1.Text = "The picture has changed." 
End Sub
private void rectangleShape1_BackgroundImageChanged(object sender, System.EventArgs e)
{
    // Display a message in the Label.
    label1.Text = "The picture has changed.";
}

.NET Framework Security

See Also

Reference

SimpleShape Class

Microsoft.VisualBasic.PowerPacks Namespace

Other Resources

Introduction to the Line and Shape Controls (Visual Studio)

How to: Draw Lines with the LineShape Control (Visual Studio)

How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)