谢谢!
在窗口的 Timertick 中 加入如下代码:
Static OpenQQ As WinForm.button
Static LastTime As Date
If OpenQQ Is Nothing Then
OpenQQ = Forms("主窗口").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
能显示 消息的条数, 但并没有闪烁。 我在该事件下还有一段切换背景代码如下:
Static i As Integer
If i = 0 Then
i = 1
End If
e.Form.baseform.controls("主窗口").backgroundimage=getimage("G:\foxtable\管理项目1\Images\图片\" & i & ".jpg")
i = i + 1
If i = 64 Then
i = 1
End If
是不是两者有冲突,只有当背景(背景30秒切换) 切换时,才更新消息的条数。怎么更改才不冲突?
另: 在OpenQQ客户端事件Connected事件代码设置为:
Forms("主窗口").Controls("OpenQQ").SmallImage = GetImage("online.ico")
好像也由问题,图片的颜色不变哦!
请教狐爸,哪里有问题?