Shape.ContextMenuStripChanged Event


Occurs when the value of the ContextMenuStrip property changes.

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

public event EventHandler ContextMenuStripChanged

This event is raised if the ContextMenuStrip 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 displays a message when a change occurs to the shortcut menu. This example requires that you have a RectangleShape control named RectangleShape1 on a form.

private void rectangleShape1_ContextMenuStripChanged(object sender, System.EventArgs e)
    MessageBox.Show("A new shortcut menu is available");
Return to top