clsimages.cls

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

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


Public Function Add(ByVal Image As IPictureDisp, _
                                        Optional ByVal Left As Single, _
                                        Optional ByVal Top As Single, _
                                        Optional ByVal Width, _
                                        Optional ByVal Height, _
                                        Optional ByVal PositionIsAbsolute As Boolean) As clsImageAttributes

Dim i As New clsImageAttributes

    With i
        Set .Image = Image
        .Left = Left
        .Top = Top
        .Width = Width
        .Height = Height
        .PositionIsAbsolute = PositionIsAbsolute
    End With
    colImages.Add i
    Set Add = i
    CQueue.Add objTypeImage, Count
End Function

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

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

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

Private Sub Class_Terminate()
    Set colImages = Nothing
End Sub

⌨️ 快捷键说明

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