Change the Coordinates Displayed in the Status Bar Programmatically

2515
2
04-03-2013 01:08 PM
DavidSiders
New Contributor
I am looking for a way to programmatically change the coordinates displayed in the status bar from WGS84 Decimal Degrees to DMS or MGRS. I know the user can change this themselves, but my requirements are to do it programmatically. I have built a tool that overrides the mousemove event and does this for me but when the user selects another tool the status bar goes back to displaying WGS84 coordinates in DD's.  This conversion needs to be persistent, regardless of the tool being used.  Is there a setting in the Application I can change programmatically to accomplish this? Thanks.
0 Kudos
2 Replies
LeoDonahue
Occasional Contributor III
com.esri.arcgis.arcmapui.MxStatusBar ?
0 Kudos
DavidSiders
New Contributor
The official response I received from ESRI support was to change the IMap.MapUnits property using the esriUnits enumeration. The problem is that none of the esriUnits options will give me a read out of DMS or MGRS coordinates.

From the research I have done it is possible to change the message in the Status Bar by using the Application.StatusBar.set_Message({pane number}, {string message}) method.

I can build this is as tool and use the OnMouseMove event, get the x and y coordinates and project them to desired coordinates system and then display them on the status bar. I need this to be a persistent solution. With the tool solution, once the user clicks on another tool all other tools do not work. 

Is there another way to employ the OnMouseMove event with out extending the Tool class?
0 Kudos