原本打算用自己的代码实现放大缩小等功能
先在主窗体定义一个全局变量用于控制点击菜单的类型
private string m_BasicOperationTool;//标识当前所选择的工具名称
然后再菜单处定义
//m_BasicOperationTool = "isZoomIn";
//this.axMapControl1.MousePointer = esriControlsMousePointer.esriPointerZoomIn;
m_BasicOperationTool = "isZoomPan";
this.axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPan;
m_BasicOperationTool = "isZoomOut";
this.axMapControl1.MousePointer = esriControlsMousePointer.esriPointerZoomOut;
最后在 axMapcontrol 的onmousedown事件下添加代码如下:
//IEnvelope objEnvelope = null;
//IPoint pPoint = null;
//IActiveView pActiveView = axMapControl1.ActiveView.FocusMap as IActiveView;
//pPoint = pActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x, e.y);
//switch (m_BasicOperationTool)