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

📄 clmessageaffiche.cls

📁 很好的学习资料可供参考有实例从图书馆着的希望有帮祝
💻 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 = "clMessageAffiche"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private fTime As frmTime
Private WithEvents mwtmrMessage As Timer
Attribute mwtmrMessage.VB_VarHelpID = -1
Public strText As String
Event MessageReady()

Private Sub Class_Initialize()
    '创建frmTime类型的窗体,
    '并从中引用公布消息的时间对象。
    Set fTime = New frmTime
    Load fTime
    Set mwtmrMessage = fTime.tmrMessage
End Sub

Private Sub Class_Terminate()
    '卸载公布消息的时间对象,
    '卸载frmTime类型的窗体。
    Set mwtmrMessage = Nothing
    Unload fTime
    Set fTime = Nothing
End Sub

Private Sub mwtmrMessage_Timer()
    '公布消息
    Dim strNextLine As String, strTotalLine As String
    '读文件
    Open App.Path & "\Message.txt" For Input As #1
    Do Until EOF(1)
        Line Input #1, strNextLine
        strTotalLine = strTotalLine & strNextLine & Chr(13) & Chr(10)
    Loop
    Close #1
    strText = strTotalLine
    '激活发布消息事件
    RaiseEvent MessageReady
End Sub

⌨️ 快捷键说明

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