clsrectangles.cls

来自「This application provides much functiona」· CLS 代码 · 共 57 行

CLS
57
字号
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsRectangles"
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

Private colRectangles As Collection


Public Function Add(Optional ByVal Left As Single, _
                                        Optional ByVal Top As Single, _
                                        Optional ByVal Right As Single, _
                                        Optional ByVal Bottom As Single, _
                                        Optional ByVal PositionIsAbsolute As Boolean) As clsRectangleAttributes

Dim r As New clsRectangleAttributes

    With r
        .Left = Left
        .Top = Top
        .Right = Right
        .Bottom = Bottom
        .PositionIsAbsolute = PositionIsAbsolute
    End With
    colRectangles.Add r
    Set Add = r
    CQueue.Add objTypeRectangle, Count
End Function

Public Property Get Count() As Integer
    Count = colRectangles.Count
End Property

Public Property Get Item(ByVal Index As Integer) As clsRectangleAttributes
Attribute Item.VB_UserMemId = 0
    Set Item = colRectangles.Item(Index)
End Property

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

Private Sub Class_Terminate()
    Set colRectangles = Nothing
End Sub

⌨️ 快捷键说明

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