This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Statements - Left and Right Mouse Clicks Snippet (ArcObjects .NET 10.4 SDK) |
Stub code for using left and right mouse clicks for ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent.
//<-- Snippet Start --> // DESCRIPTION: // Stub code for using left and right mouse clicks for ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent. if (e.button == 1) // Left mouse click { //TODO: Your implementation code..... } if (e.button == 2) // Right mouse click { //TODO: Your implementation code..... } //<-- Snippet End -->
' <-- Snippet Start --> ' DESCRIPTION: ' Stub code for using left and right mouse clicks for ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent. If e.button=1 Then ' Left mouse click ' TODO: Your implementation code..... End If If e.button=2 Then ' Right mouse click ' TODO: Your implementation code..... End If ' <-- Snippet End -->