vba14-5.txt
来自「本书给出了AO的常用的VAB代码 可能是初学者很好的一本参考书」· 文本 代码 · 共 18 行
TXT
18 行
Private Sub LabelLayer(pFeatureLayer As IFeatureLayer, _
blnLabel As Boolean)
' Label a layer by turining on
' the label property.
Dim pGeoFeatureLayer As IGeoFeatureLayer
Dim pMxDocument As IMxDocument
Dim pMap As IMap
Dim pActiveView As IActiveView
Set pMxDocument = Application.Document
Set pMap = pMxDocument.FocusMap
Set pActiveView = pMap
' Turn on or off the layer's labeling.
Set pGeoFeatureLayer = pFeatureLayer
pGeoFeatureLayer.DisplayField = "NAME"
pGeoFeatureLayer.DisplayAnnotation = blnLabel
pActiveView.Refresh
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?