EnabledChanged Event

Shape.EnabledChanged Event


Occurs when the Enabled property value has changed.

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

public event EventHandler EnabledChanged

This event is raised if the Enabled 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 changes the Cursor when the Enabled property is changed to true. This example requires that you have a RectangleShape control named RectangleShape1 on a form.

private void rectangleShape1_EnabledChanged(object sender, System.EventArgs e)
    if (rectangleShape1.Enabled == true)
    // Display a crosshair cursor.
        rectangleShape1.Cursor = Cursors.Cross;
Return to top
© 2016 Microsoft