以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  TopicBar显示openqq的信息  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=147295)

--  作者:fendouww
--  发布时间:2020/3/13 13:38:00
--  TopicBar显示openqq的信息
TopicBar能显示openqq的信息吗?
图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

--  作者:有点蓝
--  发布时间:2020/3/13 13:54:00
--  
参考上面的代码把需要显示的任何内容(比如openQQ接收到的某某信息)添加到link里即可
--  作者:fendouww
--  发布时间:2020/3/13 14:04:00
--  
Dim Page As WinForm.TopicPage


Static OpenQQ As RibbonMenu.Button
Static LastTime As Date
If OpenQQ Is Nothing Then
    OpenQQ = ConfigBar.Items("OpenQQ")
End If
Dim txt As String
If QQClient.Ready
    If QQClient.UnreadCount > 0 Then
        txt = "(" & QQClient.UnreadCount & "条)"
    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

Page = e.Form.Controls("TopicBar1").Pages.Add("消息","消息")
Page.Links.Add("未读消息","今日未读消息(" & cnt1 & ")条" )
Page.Links.Add("已读消息","已读消息(" & cnt2 & ")条" )



这里代码要如何修改,我就简单显示有多少条未读

--  作者:有点蓝
--  发布时间:2020/3/13 14:35:00
--  
窗口afterload,如果要数量实时变化,可以把代码放到计时事件中

dim cnt1 as integer = 0
If QQClient.Ready
    cnt1 = QQClient.UnreadCount
End I
Page = e.Form.Controls("TopicBar1").Pages.Add("消息","消息")
Page.Links.Add("未读消息","今日未读消息(" & cnt1 & ")条" )
‘Page.Links.Add("已读消息","已读消息(" & cnt2 & ")条" )没有办法获取已读信息数