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
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(); appCursor.SetCursor(2);
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?