Foxtable(狐表)用户栏目专家坐堂 → [求助]systemidle对动态产生的物件无效?


  共有1676人关注过本帖平板打印复制链接

主题:[求助]systemidle对动态产生的物件无效?

帅哥哟,离线,有人找我吗?
tennis
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1433 积分:10763 威望:0 精华:0 注册:2013/3/29 10:23:00
[求助]systemidle对动态产生的物件无效?  发帖心情 Post By:2019/8/18 15:54:00 [只看该作者]

请教各位大大,在systemidle 中设定的代码对动态产生的物件好像无效,不知有没人遇到
案例:OpenQQ于佩置栏动态生成,但systemidle中确对该蝴蝶没作用

图片点击可在新窗口打开查看此主题相关图片如下:ff.jpg
图片点击可在新窗口打开查看


3、假定这个新增按钮名称为"OpenQQ",在菜单的SystemIdle事件增加以下代码:

'此段代码用于显示OpenQQ的未读消息
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



 回到顶部