clslines.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 = "clsLines"
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 colLines As Collection


Public Function Add(Optional ByVal X1 As Single, _
                                        Optional ByVal Y1 As Single, _
                                        Optional ByVal X2 As Single, _
                                        Optional ByVal Y2 As Single, _
                                        Optional ByVal PositionIsAbsolute As Boolean) As clsLineAttributes

Dim L As New clsLineAttributes

    With L
        .X1 = X1
        .X2 = X2
        .Y1 = Y1
        .Y2 = Y2
        .PositionIsAbsolute = PositionIsAbsolute
    End With
    colLines.Add L
    Set Add = L
    CQueue.Add objTypeLine, Count
End Function

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

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

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

Private Sub Class_Terminate()
    Set colLines = Nothing
End Sub

⌨️ 快捷键说明

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