Foxtable(狐表)用户栏目专家坐堂 → [求助]openqq


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

主题:[求助]openqq

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


加好友 发短信
等级:七尾狐 帖子:1649 积分:14629 威望:0 精华:0 注册:2014/6/6 8:42:00
[求助]openqq  发帖心情 Post By:2015/12/3 8:45:00 [只看该作者]

老师,openqq的消息提示如果设置在窗口,

If OpenQQ Is Nothing Then
    OpenQQ = ConfigBar.Items("OpenQQ")
End If

这条代码该怎么改:OpenQQ = ConfigBar.Items("OpenQQ")
请指点,谢谢!


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


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

If OpenQQ Is Nothing Then
    OpenQQ = Forms("窗口1").Controls("TextBox1")

End If


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


加好友 发短信
等级:七尾狐 帖子:1649 积分:14629 威望:0 精华:0 注册:2014/6/6 8:42:00
  发帖心情 Post By:2015/12/3 15:50:00 [只看该作者]

红袍老师,未读消息提示代码放在窗口 afterload怎么不闪烁,放在timertick中闪烁 按照设定间隔,不是0.5秒

'此段代码用于显示OpenQQ的未读消息
Static OpenQQ As winForm.Button
Static LastTime As Date
If OpenQQ Is Nothing Then
    OpenQQ = Forms("窗口13").Controls("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

[此贴子已经被作者于2015/12/3 15:51:24编辑过]

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


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

你放在timertick事件了吗?开启了吗?

 

http://www.foxtable.com/help/topics/1301.htm

 

放在timertick的话,可以简化一下的。

 

Static OpenQQ As winForm.Button
If OpenQQ Is Nothing Then
    OpenQQ = Forms("窗口13").Controls("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
    If OpenQQ.ForeColor = Color.Red Then
        OpenQQ.ForeColor = Color.Transparent
    Else
        OpenQQ.ForeColor = Color.Red
    End If

End If


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


加好友 发短信
等级:七尾狐 帖子:1649 积分:14629 威望:0 精华:0 注册:2014/6/6 8:42:00
  发帖心情 Post By:2015/12/3 16:15:00 [只看该作者]

我是放在timertick中的,我的意思是放在afterload中不闪烁,是不是下面的0.5秒执行一次的代码没有执行

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

[此贴子已经被作者于2015/12/3 16:16:17编辑过]

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


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

有没有执行,你加入msgbox不就知道了?

 

看4楼,你要启动timertick才会触发事件啊


 回到顶部