Can you elaborate on how this can be implemented? I am trying to change my tool cursor after click events, from one cursor to another, depending on the current click's function. I am currently only able to set the cursor to default Window.Forms.Cursors.
I had much better success usingOnActivate() System.Windows.Forms.Cursor.Current = Cursors.WaitCursor 'do stuff My.ArcMap.Application.CurrentTool = Nothing End Sub
OnActivate() System.Windows.Forms.Cursor.Current = Cursors.WaitCursor 'do stuff My.ArcMap.Application.CurrentTool = Nothing End Sub
<Tool id="Microsoft_ArcMapAddin1_Jeffry_Class" class="Jeffry_Class" message="This is the description" caption="Jeffry" tip="Cursor Tooltip" category="AddInControls" image="Images\Jeffry_Class.png" cursor="Images\JeffryCustomCursor.cur">
'OnMouse down Protected Overrides Sub OnMouseDown(ByVal arg As ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs) MyBase.OnMouseDown(arg) 'Code here on Mouse down End Sub
'for Cursor - create the cursor m_Cursor = New System.Windows.Forms.Cursor(Me.GetType.Assembly.GetManifestResourceStream("FocusToolsToolbar.CrosshairCursor.cur")) If Not m_Cursor Is Nothing Then mh_Cursor = m_Cursor.Handle End If Public ReadOnly Property cursor() As Integer Implements ESRI.ArcGIS.SystemUI.ITool.Cursor Get Return mh_Cursor.ToInt32 End Get End Property
this is in C#override Tool Cursor method andreturn Cursors.Cross.Handle.ToInt32();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.