SimpleShape.Resize Event


Occurs when the size of a shape is changed.

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

public event EventHandler Resize

This event is raised if the size of a shape 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 Resize event in an event handler. This example requires that you have two RectangleShape controls named RectangleShape1 and RectangleShape2 on a form.

private void rectangleShape1_Resize(object sender, System.EventArgs e)
    // If the second rectangle intersects with the first, move it.
    if (rectangleShape1.ClientRectangle.IntersectsWith(rectangleShape2.ClientRectangle))
        rectangleShape2.Location = new Point(rectangleShape1.Right, 
Return to top