rcads
路人甲
路人甲
  • 注册日期2004-05-19
  • 发帖数92
  • QQ
  • 铜币2526枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1431回复:0

求助,为何我的这段代码不能显示SelectionTrack的handle?

楼主#
更多 发布于:2004-09-28 17:40
    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
喜欢0 评分0
游客

返回顶部