⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vba16-2.txt

📁 vb.net的开发及应用程序属性查询及应用程序属性查询
💻 TXT
字号:
Public Sub ClearPageLayout()
    ' Remove all frames except maps.
    Dim pMxDocument As IMxDocument
    Dim pPageLayout As IPageLayout
    Dim pGraphicsContainer As IGraphicsContainer
    Dim pElementsSet As ISet
    Dim pElement As IElement
    Dim pActiveView As IActiveView
    ' Access page layout.
    Set pMxDocument = Application.Document
    Set pPageLayout = pMxDocument.PageLayout
    Set pGraphicsContainer = pPageLayout
    Set pActiveView = pPageLayout
    ' First create a set of elements to be deleted.
    Set pElementsSet = New esriCore.Set
    pGraphicsContainer.Reset
    Set pElement = pGraphicsContainer.Next
    Do While Not pElement Is Nothing
        If Not TypeOf pElement Is IMapFrame Then
            pElementsSet.Add pElement
        End If
        Set pElement = pGraphicsContainer.Next
    Loop
    ' Next remove the elements from the
    ' graphics container.
    pElementsSet.Reset
    Set pElement = pElementsSet.Next
    Do While Not pElement Is Nothing
        pGraphicsContainer.DeleteElement pElement
        Set pElement = pElementsSet.Next
    Loop
    ' Finaly refresh the view.
    pActiveView.Refresh
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -