老师,我用窗口当主界面,原来OpenQQ是弄到配置栏的,现在弄到窗口中,
网络监视器中,请教一下这两个事件的代码怎么变通?
Connected事件:
ConfigBar.Items("OpenQQ").SmallImage = GetImage("onqq.png")
Disconnected事件:
ConfigBar.Items("OpenQQ").SmallImage = GetImage("offqq.png")
SystemIdle事件:
'统计OPenQQ消息数量
Static OpenQQ As RibbonMenu.Button
Static LastTime As Date
If OpenQQ Is Nothing Then
'OpenQQ = ConfigBar.Items("OpenQQ")
OpenQQ = Forms("主窗口").Controls("OpenQQ")
End If
Dim txt As String
If QQClient.Ready
If QQClient.UnreadCount > 0 Then
txt = "OpenQQ(" & QQClient.UnreadCount & "条)"
Else
txt = "OpenQQ"
End If
End If
If OpenQQ.Text <> txt Then
OpenQQ.Text = txt
End If
If OpenQQ.Text > "" Then
Dim ntp As timeSpan = Date.Now - LastTime
If ntp.TotalSeconds >= 0.5 Then
LastTime = Date.Now
If OpenQQ.ForeColor = Color.Red Then
OpenQQ.ForeColor = Color.Transparent
Else
OpenQQ.ForeColor = Color.Red
End If
End If
End If
[此贴子已经被作者于2019/10/28 11:28:03编辑过]