怎样使用.NET技术实现QQ头像来信息闪烁效果?

来源:百度知道 编辑:UC知道 时间:2024/07/04 21:09:42

//第二个Timer控件,控制发送消息的好友头像闪烁
private void tmrChange_Tick(object sender, EventArgs e)
{
//找出发消息人所在的地方
for (int j = 0; j < 3; j++)
for (int i = 0; i < sbFriends.Groups[j].Items.Count; i++)
{
if (Convert.ToInt32(sbFriends.Groups[j].Items[i].Tag) == friendNewId)
{
if (sbFriends.Groups[j].Items[i].ImageIndex < 100)
{
sbFriends.Groups[j].Items[i].ImageIndex = 101;//选择为背景图像的索引
}
else if(sbFriends.Groups[j].Items[i].ImageIndex==101)
{
sbFriends.Groups[j].Items[i].ImageIndex =faceId;//选择为好友的图像索引
}

}
}
sbFriend