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

📄 ctip.cls

📁 VB精彩百例
💻 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 = "cTip"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
    Option Explicit
    
' Show Debuging messages?
' Change to False to not compile the MsgBoxes
    #Const ShowDebugMsgBox = False
'    #Const ShowDebugMsgBox = True
    
' Private data members

    Private m_sText As String
    Private m_sID As String
    Private m_dtCreated As Date

Public Property Let Text(sText As String)
' Public property procedures
' Description of the tip
    m_sText = sText
End Property
Public Property Get Text() As String
    Text = m_sText
End Property
Public Property Let ID(sID As String)
' ID within the collection
' Note: It must be a string
    m_sID = sID
End Property
Public Property Get ID() As String
    ID = m_sID
End Property
Public Property Get Created() As Date
' Read-only creation date
    Created = m_dtCreated
End Property
Private Sub Class_Initialize()
' Initialize event
    m_dtCreated = Now
' Dispay this in a message box
' This is good for debugging, but should be removed for production
    #If ShowDebugMsgBox Then
        MsgBox "Tip created: " & Created, vbInformation
    #End If
End Sub
Private Sub Class_Terminate()
' Terminate Event
' Dispay this in a message box
' This is good for debugging, but should be removed for production
    #If ShowDebugMsgBox Then
        MsgBox "Tip: " & Created & " is now terminated.", vbInformation
    #End If
End Sub

⌨️ 快捷键说明

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