阅读:1244回复:0
求救?猪头外劳
<STRONG>好用的:自己的工具条中使用ArcGIS Engine提供的命令和工具</STRONG><BR>以放大工具为例,在你自己的工具条上的ZoomInTool的Click事件中添加以下的代码就可以使用Engine提供的放大的功能。下面是c#的代码<BR>ESRI.ArcGIS.SystemUI.ICommand pCommand;<BR>pCommand = new ESRI.ArcGIS.ControlCommands.ControlsMapZoomInToolClass ();<BR>pCommand.OnCreate (axMapControl1.Object );<BR>axMapControl1.CurrentTool = pCommand as ESRI.ArcGIS.SystemUI.ITool ;
<P>不好用的:</P> <P>ESRI.ArcGIS.SystemUI.ICommand pCommand;<BR>pCommand = new ESRI.ArcGIS.ControlCommands.ControlsMapFullClass ();<BR>pCommand.OnCreate (axMapControl1.Object );<BR>axMapControl1.CurrentTool = pCommand as ESRI.ArcGIS.SystemUI.ITool ;</P> <P>或axMapControl1.CurrentTool = pCommand as ESRI.ArcGIS.SystemUI.ICommand ;都不好用</P> |
|