unable to change mouse pointer in arcgis engine application  --  axToolbarControl

03-16-2012 01:12 PM
New Contributor
I have this windows application built with ArcGIS engine 10. in the form I have couple of buttons, a map control and a axToolbarControl. once a item on the axToolbarControl is clicked for example ZoomIn button, the mouse pointer change to the ZoomIn icon which is good. I have this button when user click on it, they can start adding a point on the map. I want to change the mouse pointer to arrow after user clicks the button. here is what i did

1. when the button is clicked, set the map toolmode to be 1
2. in mouseMove event, if toolmode == 1, set the mousepointer to be arrow: axMapControl1.MousePointer = esriControlsMousePointer.esriPointerArrow;
3. in map mousedown event, if toolmode = 1, do things....

the mouse pointer remained ZoomIn. i can't seem to change it to another one.
Any help?
Thanks very much
0 Kudos
1 Reply
Occasional Contributor
I've experienced similar trouble and posted a thread recently for this : http://forums.arcgis.com/threads/52090-Setting-the-mouse-cursor-in-a-custom-application

It seems that ArcObjects overrides the application cursor with its own cursor property depending on which functionality is being invoked.
Tracking a pan operation for instance, will cause ArcObjects to override the cursor (at each relevant internal event trigger) even if you set it explicitly for the application through DotNet.

What we probably need is a way (interface) to specifically tell ArcObjects not to change the cursor when we don't want it to - or, to provide it with a set of cursor descriptions to use under which circumstances.
My first guess was to use IMouseCursor:

        IMouseCursor appCursor = new MouseCursorClass();

but IMouseCursor is only available for ArcDesktop (and even if it was available for Engine, I'm not sure if it would help).
So the question remains, how can we get more accurate control over the mouse cursor?