cfindsubtools.cls

来自「vb开发的合同管理系统」· CLS 代码 · 共 47 行

CLS
47
字号
VERSION 1.0 CLASS
Begin
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
End
Attribute VB_Name = "cFindSubTools"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private mcol As Collection, m_Tool As cFindSubTool

Private Sub Class_Initialize()
    Set mcol = New Collection
End Sub

Private Sub Class_Terminate()
    Set mcol = Nothing
End Sub

Public Sub Clear()
    Set mcol = Nothing
    Set mcol = New Collection
End Sub

Public Sub Add(ByVal Key As String, ByVal Caption As String)
    Set m_Tool = Nothing
    Set m_Tool = New cFindSubTool
    m_Tool.csKey = Key
    m_Tool.csCaption = Caption
    mcol.Add m_Tool, Key
End Sub

Public Function Count() As Long
    Count = mcol.Count
End Function

Public Function Item(vntIndexKey As Variant) As cFindSubTool
    Set Item = mcol(vntIndexKey)
End Function
    

⌨️ 快捷键说明

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