|
阅读:1525回复:1
求助??Arcgis engine编程实现identify功能
<P>如何用arcgis engine编程实现identify功能?我在官方网站上下了一段vb代码,但是不怎么看得懂,有没有哪位高人能帮我翻译成c#啊?</P>
<P>Private Sub UIToolControl1_MouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long)<BR> Dim pMxDoc As IMxDocument<BR> Dim pActiveView As IActiveView<BR> Dim pIdentifyDialog As IIdentifyDialog<BR> Dim pIdentifyDialogProps As IIdentifyDialogProps<BR> Dim pEnumLayer As IEnumLayer<BR> Dim pLayer As ILayer<BR><BR> Set pMxDoc = Application.Document<BR> Set pActiveView = pMxDoc.FocusMap<BR><BR> 'Create a new IdentifyDialog and associate it<BR> 'with the focus map and the map's display<BR> Set pIdentifyDialog = New IdentifyDialog<BR> Set pIdentifyDialogProps = pIdentifyDialog 'QI<BR> Set pIdentifyDialog.Map = pMxDoc.FocusMap<BR> Set pIdentifyDialog.Display = pActiveView.ScreenDisplay<BR> <BR> 'Clear the dialog on each mouse click<BR> pIdentifyDialog.ClearLayers<BR> <BR> 'Perform an identify on all of the layers the dialog<BR> 'says are searchable<BR> Set pEnumLayer = pIdentifyDialogProps.Layers<BR> pEnumLayer.Reset<BR> Set pLayer = pEnumLayer.Next<BR> Do While Not pLayer Is Nothing<BR> pIdentifyDialog.AddLayerIdentifyPoint pLayer, x, y<BR> Set pLayer = pEnumLayer.Next<BR> Loop<BR> <BR> pIdentifyDialog.Show<BR> <BR>End Sub<BR></P> |
|
|
1楼#
发布于:2007-06-23 09:23
我也很想指知道啊!哪位高人给翻译一下吧1<img src="images/post/smile/dvbbs/em02.gif" />
|
|