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

📄 clsmenu.cls

📁 这是一个非常全的VB+AO二次开发实例集
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsmenu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
 Option Explicit
 
 'Implement the IMenuDef interface and IRootLevelMenu interface
 Implements IMenuDef
 Implements IRootLevelMenu
 
 Private Property Get IMenuDef_Caption() As String
     ' Set the string that appears as the menu's title
     IMenuDef_Caption = "MyMenu"
 End Property
 
 Private Sub IMenuDef_GetItemInfo(ByVal pos As Long, ByVal itemDef As esriCore.IItemDef)
     ' Define the commands that will be on the menu. The built-in ArcMap
     ' Full Extent command, and Fixed Zoom In command are added to this custom menu.
     ' ID is the ClassID of the command. Group determines whether the command
     ' begins a new group on the menu
     Select Case pos
     Case 0
         itemDef.ID = "esriCore.FullExtentCommand"
         itemDef.Group = True
     Case 1

         itemDef.ID = "promenu.clsmultitem"
         itemDef.Group = True
     Case 2
         itemDef.ID = "esriCore.ZoomInFixedCommand"
         itemDef.Group = True
     End Select
 
 End Sub
 
 Private Property Get IMenuDef_ItemCount() As Long
     ' Set how many commands will be on the menu
     IMenuDef_ItemCount = 3
 End Property
 
 Private Property Get IMenuDef_Name() As String
     ' Set the internal name of the menu.
     IMenuDef_Name = "MyMenu"
 End Property

⌨️ 快捷键说明

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