Foxtable(狐表)用户栏目专家坐堂 → systemidle事件代码请教


  共有1952人关注过本帖树形打印复制链接

主题:systemidle事件代码请教

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


加好友 发短信
等级:六尾狐 帖子:1368 积分:12189 威望:0 精华:0 注册:2012/3/5 11:32:00
systemidle事件代码请教  发帖心情 Post By:2016/2/24 9:55:00 [只看该作者]


'QQ闪烁
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

'待办事件闪烁
Static workwait As RibbonMenu.Button
Static LastTime1 As Date
If workwait Is Nothing Then
    workwait = ConfigBar.Items("待办事宜")
End If
Dim txt1 As String
Dim drsp As List(Of DataRow)
drsp = DataTables("信息查阅情况").Select("状态 = 0 and 人名  = '" & Vars("user") & "' and 会议开始时间 > #" & Date.now & "#")

    If drsp.Count > 0 Then
        txt1 =   "(" & drsp.Count & "件)"
    Else
    txt1= ""
    End If

If workwait.Text <> txt1 Then
    workwait.Text = txt1
End If
If drsp.Count > 0 Then
    Dim ntp As timeSpan = Date.Now - LastTime1
    If ntp.TotalSeconds >= 0.5 Then
        LastTime1 = Date.Now
        If workwait.ForeColor = Color.Red Then
            workwait.ForeColor = Color.Transparent
        Else
            workwait.ForeColor = Color.Red
        End If
    End If
End If

Static biaoqian As RibbonMenu.Label
If biaoqian  Is Nothing Then
biaoqian = ConfigBar.Items("标签1")   ‘用于固定配置栏的长度
End If
If txt.Contains("(") AndAlso txt1.Contains("(") Then
biaoqian.text = "                               "
End If
If txt.Contains("(") AndAlso txt1.Contains("(") = False Then
biaoqian.text = "                                     "
End If
If txt.Contains("(") = False AndAlso txt1.Contains("(") Then
biaoqian.text = "                                     "
End If
If txt.Contains("(") = False AndAlso txt1.Contains("(") = False Then
biaoqian.text = "                                             "
End If

systemidle事件里面加了红色的代码  就会报错,提示 未应用到实例中

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2016/2/24 9:58:00 [只看该作者]

不应该报错的,你赋初值看看

 

Dim txt As String = ""


 回到顶部