com.esri.arcgis.framework
Interface IMouseCursor

All Superinterfaces:
Serializable
All Known Implementing Classes:
IMouseCursorProxy, MouseCursor

public interface IMouseCursor
extends Serializable

Provides access to members that set the system cursor.

Description

The MouseCursor is a reference to the system mouse cursor object. You can use MouseCursor to set the system mouse cursor to be one of the standard built-in cursors or a custom cursor. This is useful if you want to display a wait cursor while you code performs a large process.

Remarks

The IMouseCursor interface has one method, SetCursor, for setting the system's cursor to the cursor id or picture object specified by the cursorID parameter. The cursor is automatically reset when the MouseCursor instance is released. The instance is released when the calling procedure ends, when the variable that references the mouse cursor is set to nothing, or when something, such as the display of a message box, overrides Windows messaging.

Product Availability

Available with ArcGIS Desktop.


Method Summary
 void setCursor(Object cursorID)
          Sets the application's cursor to cursor id or picture object specified by cursorID.
 

Method Detail

setCursor

void setCursor(Object cursorID)
               throws IOException,
                      AutomationException
Sets the application's cursor to cursor id or picture object specified by cursorID. The cursor is automatically reset when the MouseCursor instance is released.

Description

The values for cursorID are:

Remarks

You can use one of the built-in cursors, or you can set the cursor to a custom cursor. You can use either cursor files (.cur) or icon files (.ico). The cursor is automatically reset when the MouseCursor instance is released. The instance is released when the calling procedure ends, when the variable that references the mouse cursor is set to nothing, or when something, such as the display of a message box, overrides Windows messaging.

The following example uses the built-in wait cursor. The cursor is automatically reset when this Sub procedure ends. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Parameters:
cursorID - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.