com.esri.arcgis.framework
Class IMouseCursorProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.framework.IMouseCursorProxy
All Implemented Interfaces:
IMouseCursor, Externalizable, Serializable

public class IMouseCursorProxy
extends com.esri.arcgis.interop.Dispatch
implements IMouseCursor, 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.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IMouseCursorProxy()
           
  IMouseCursorProxy(Object obj)
           
protected IMouseCursorProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void removeListener(String iidStr, Object theListener)
           
 void setCursor(Object cursorID)
          Sets the application's cursor to cursor id or picture object specified by cursorID.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IMouseCursorProxy

public IMouseCursorProxy()

IMouseCursorProxy

public IMouseCursorProxy(Object obj)
                  throws IOException
Throws:
IOException

IMouseCursorProxy

protected IMouseCursorProxy(Object obj,
                            String iid)
                     throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

setCursor

public 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

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