阅读:1533回复:0
求助,为何我的这段代码不能显示SelectionTrack的handle?
Private Sub AxPageLayoutControl1_OnMouseUp(ByVal sender As Object, ByVal e As ESRI.ArcGIS.PageLayoutControl.IPageLayoutControlEvents_OnMouseUpEvent) Handles AxPageLayoutControl1.OnMouseUp
Dim pPageActiveView As IActiveView pPageActiveView = AxPageLayoutControl1.ActiveView m_pPoint = pPageActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(e.x, e.y) Dim m_pGraphContainer As IGraphicsContainer Dim m_pGraphSel As IGraphicsContainerSelect Dim pEnumElement As IEnumElement Dim pElement As IElement ''use a tolerance of 16 pixels Dim tol As Double Dim m_pSelectionTracker As ISelectionTracker tol = ConvertPixelsToMapUnits(pPageActiveView, 16) m_pGraphContainer = AxPageLayoutControl1.PageLayout pEnumElement = m_pGraphContainer.LocateElements(m_pPoint, tol) pElement = pEnumElement.Next m_pGraphSel = AxPageLayoutControl1.PageLayout m_pGraphSel.SelectElement(pElement) m_pSelectionTracker = pElement.SelectionTracker m_pSelectionTracker.Display = pPageActiveView.ScreenDisplay m_pSelectionTracker.Geometry = pElement.Geometry m_pSelectionTracker.ShowHandles = True m_pSelectionTracker.Locked = True pPageActiveView.Refresh() End Sub |
|