Get coordinate of mouse

hj everynoe.
I want to get the value of mouse’s coordinate directly from axMap control (as figure). I don’t want to get coordinate via mousemove event because I have to convert which will slower. Could you help me. Thanks a lot.

Hello @tiennguyen

The coordinate display in the corner is calculated and formatted on-the-fly with every mouse movement, the same way you would do it in the MouseMove event. But it is not stored anywhere - it is written directly to the screen (using GDI+), so there is no way to retrieve it.

If you need a custom display, it is not uncommon to perform the same operation in your MouseMove event, even though it is essentially doubling the work. You also have the option of turning off the display in the corner if you’re formatting your own string.

Jerry.

Thank for your answer. I have tried to get coordinate from mousemove event. However, like you said, speed update coordinate of mouse slower more than coordinate of corner because I have to convert from coordinate screen into projection and then display it. The data map of my project have color same color of text coordinate of the corner, so I want to display it on other position such as statusbar of winform. Now I really have not found method to solve it.