Shape.ParentChanged Event


Occurs when the Parent property value changes.

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

public event EventHandler ParentChanged

The Parent property must be set to an instance of a ShapeContainer.

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

The following example shows how to respond to the ParentChanged event in an event handler. This example requires that you have an OvalShape control named OvalShape1 on a form.

private void ovalShape1_ParentChanged(object sender, System.EventArgs e)
    MessageBox.Show("The shape has been moved to a new container.");
Return to top