Indicates if a context menu should be displayed at the given xy location. Return true if handled.
[Visual Basic .NET] Public Event OnContextMenu As OnContextMenuEventHandler
[C#] public event OnContextMenuEventHandler OnContextMenu
[C++]
HRESULT OnContextMenu(
long X,
long Y,
VARIANT_BOOL* handled
);
[C++]Parameters
X [in] X is a parameter of type long Y [in] Y is a parameter of type long handled [out, retval] handled is a parameter of type VARIANT_BOOL
Product Availability
Available with ArcGIS Engine.
Description
The OnContextMenu event is fired when a user right clicks within the IEngineNetworkAnalystEnvironment::NAWindow and can be used to supply a context menu.
[C#]
public boolOnContextMenu(intx,inty) {//Create a context point at the location of the right mouse clickSystem.Drawing.Point pt = this.PointToClient(System.Windows.Forms.Cursor.Position); contextMenu1.Show(this, pt);returntrue; }
[Visual Basic .NET]
Public FunctionOnContextMenu(ByValxAs Integer,ByValyAs Integer)As Boolean'Create a context point at the location of the right mouse clickDimptAsSystem.Drawing.Point pt = Me.PointToClient(System.Windows.Forms.Cursor.Position) contextMenu1.Show(Me, pt)Return True EndFunction