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)
Syntax
'Declaração
<BrowsableAttribute(True)> _
Public Event ContextMenuStripChanged As EventHandler
[BrowsableAttribute(true)]
public event EventHandler ContextMenuStripChanged
[BrowsableAttribute(true)]
public:
event EventHandler^ ContextMenuStripChanged {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member ContextMenuStripChanged : IEvent<EventHandler,
EventArgs>
JScript does not support events.
Remarks
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 Consuming 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 Sub RectangleShape1_ContextMenuStripChanged(
) Handles RectangleShape1.ContextMenuStripChanged
MsgBox("A new shortcut menu is available")
End Sub
private void rectangleShape1_ContextMenuStripChanged(object sender, System.EventArgs e)
{
MessageBox.Show("A new shortcut menu is available");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.VisualBasic.PowerPacks Namespace
Other Resources
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)