Private Sub UIButtonControl4_Click()
Dim pmxdoc As IMxDocument
Set pmxdoc = ThisDocument
Dim pactiveview As IActiveView
Set pactiveview = pmxdoc.PageLayout
Dim pgraphicscontainer As IGraphicsContainer
Dim pmapframe As IMapFrame
Set pgraphicscontainer = pmxdoc.PageLayout
Set pmapframe = pgraphicscontainer.FindFrame(pmxdoc.FocusMap)
Dim pmapsurroundframe As IMapSurroundFrame
Dim puid As New UID
Dim pelement As IElement
puid.Value = "esricore.legend"
Set pmapsurroundframe = pmapframe.CreateSurroundFrame(puid, Nothing)
pmapsurroundframe.MapSurround.Name = "legend"
Set pelement = pmapsurroundframe
Dim pmainmapelement As IElement
Dim pmainenv As IEnvelope
Set pmainmapelement = pmapframe
Set pmainenv = pmainmapelement.Geometry.Envelope
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余1页未读,立即下载