ArcObjects Library Reference  (SystemUI)    

ITool.Cursor Property

The mouse pointer for this tool.

[Visual Basic 6.0]
Property Cursor As OLE_HANDLE
[Visual Basic .NET]
Public ReadOnly Property Cursor As Integer
[C#]
public int Cursor {get;}
[Java]
public OLEHANDLE getCursor()
throws
    IOException,
    AutomationException
[C++]
HRESULT get_Cursor(
  OLE_HANDLE* Cursor
);
[C++]

Parameters

Cursor [out, retval]

  Cursor is a parameter of type OLE_HANDLE

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

When implementing ITool to create a custom tool, use the Cursor property to set the mouse pointer of the tool.

[Visual Basic 6.0]

In your Visual Basic project for this tool, the cursor can be stored in a resource file or in a PictureBox control on a form.

Here is an example of loading the cursor from a resource file.

Dim m_pCursor As IPictureDisp       'Cursor for the tool
 
Private Sub Class_Initialize()
  'Load the cursor from the resource file.
  Set m_pCursor = LoadResPicture(110, 2)
End Sub
 
Private Property Get ITool_Cursor() As esriSystem.OLE_HANDLE
  ' Set the cursor of the tool. The m_pCursor variable
  ' is set in Class_Initialize
  ITool_Cursor = m_pCursor
End Property 

Here is an example of loading the cursor from a PictureBox on a form.

Private Property Get ITool_Cursor() As esriSystem.OLE_HANDLE
  ' The VB project contains a form called Form1.
  ' PictureBox1 is the name of a PictureBox control on the form.
  ' The Picture property of PictureBox1 is set to some
  ' cursor file your system. 
  Get ITool_Cursor = Form1.Picture1.Picture.Handle   
End Property

See Also

ITool Interface

Example

ITool Example

 


Feedback Send feedback on this page