Shape.ContextMenuChanged Event
Occurs when the value of the ContextMenu property changes.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
[BrowsableAttribute(true)]
public event EventHandler ContextMenuChanged
public:
[BrowsableAttribute(true)]
event EventHandler^ ContextMenuChanged {
void add(EventHandler^ value);
void remove(EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member ContextMenuChanged : IEvent<EventHandler,
EventArgs>
<BrowsableAttribute(True)>
Public Event ContextMenuChanged As EventHandler
Remarks
This event is raised if the ContextMenu property is changed by either a programmatic modification or user interaction.
For more information about how to handle events, see Handling and Raising Events.
Examples
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_ContextMenuChanged(object sender, System.EventArgs e)
{
MessageBox.Show("A new shortcut menu is available");
}
Private Sub RectangleShape1_ContextMenuChanged(
) Handles RectangleShape1.ContextMenuChanged
MsgBox("A new shortcut menu is available")
End Sub
See Also
Shape Class
Microsoft.VisualBasic.PowerPacks Namespace
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)
Introduction to the Line and Shape Controls (Visual Studio)
Return to top