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

📄 clsqueue.cls

📁 This application provides much functionality for creating data-driven reports, including preview, gr
💻 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 = "clsQueue"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit

Public Enum objTypes
    objTypePageBreak& = 0
    objTypePoint& = 1
    objTypeLine& = 2
    objTypeRectangle& = 3
    objTypeImage& = 4
    objTypeLabel& = 5
    objTypeLabelEx& = 6
    objTypeTable& = 7
End Enum

Private Const Separator As String = "/"
Private Const lngIncrement As Long = 20

Private strQueue() As String
Private lngRealSize As Long
Private lngUsedSize As Long


Public Sub Add(objType As objTypes, objIndex As Long)
    lngUsedSize = lngUsedSize + 1
    If lngUsedSize > lngRealSize Then
        lngRealSize = lngRealSize + lngIncrement
        ReDim Preserve strQueue(1 To lngRealSize)
    End If
    strQueue(lngUsedSize) = CStr(objType & Separator & objIndex)
End Sub

Public Property Get Count() As Long
    Count = lngUsedSize
End Property

Public Property Get Item(Index As Long) As String
Attribute Item.VB_UserMemId = 0
    Item = strQueue(Index)
End Property

Private Sub Class_Initialize()
    lngRealSize = lngIncrement
    lngUsedSize = 0
    ReDim strQueue(1 To lngRealSize)
End Sub

Private Sub Class_Terminate()
    lngRealSize = 0
    lngUsedSize = 0
    Erase strQueue
End Sub

⌨️ 快捷键说明

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