clstoolbar.cls
来自「这是一个非常全的VB+AO二次开发实例集」· CLS 代码 · 共 44 行
CLS
44 行
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "clstoolbar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Implements IToolBarDef
Private Property Get IToolBarDef_Caption() As String
IToolBarDef_Caption = "CustomToolBar1"
End Property
Private Sub IToolBarDef_GetItemInfo(ByVal pos As Long, ByVal itemDef As esriCore.IItemDef)
'这里假设在当前工程(工程名称为ToolBarDef)中定义了一个类模块(名为ClsBar),它实现了
'Icommand接口(可参照1.2.1)
Select Case pos
Case 0
'用户自定义条目
itemDef.ID = "ToolBarDef.ClsBar"
itemDef.Group = False
Case 1
'系统条目
itemDef.ID = "esriCore.MxFileMenu"
itemDef.Group = False
End Select
End Sub
Private Property Get IToolBarDef_ItemCount() As Long
IToolBarDef_ItemCount = 2
End Property
Private Property Get IToolBarDef_Name() As String
IToolBarDef_Name = "CustomToolBar1"
End Property
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?