📄 activedog.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 = "ActiveDog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private ssDogKey As Long
Private iiTimeOut As Long
Dim sDogName As String
Public Property Get sDogKey() As Long
sDogKey = ssDogKey
End Property
Friend Property Let sDogKey(dblNewBalance As Long)
ssDogKey = dblNewBalance
End Property
Friend Property Get iTimeOut() As Long
iTimeOut = iiTimeOut
End Property
Friend Property Let iTimeOut(dblNewBalance As Long)
iiTimeOut = dblNewBalance
End Property
Public Function GetDogName() As String
GetDogName = sDogName
End Function
Public Function LetDogName(ByVal strDogName As String)
sDogName = strDogName
End Function
Public Function TellActive() As Boolean
TellActive = bIsActive
iiTimeOut = 0
If frmMain.lstMsg.ListCount >= 10 Then frmMain.lstMsg.Clear
frmMain.lstMsg.AddItem "标识为" & ssDogKey & ":" & sDogName & "的客户端连接 " & Now
End Function
Public Sub TellQuit()
colDogs.Remove CStr(ssDogKey)
If frmMain.lstMsg.ListCount >= 10 Then frmMain.lstMsg.Clear
frmMain.lstMsg.AddItem "标识为" & ssDogKey & ":" & sDogName & "的客户端退出 " & Now
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -