怎样闪烁系统托盘上的图标
问一下各位大侠,怎演像QQ一样闪烁系统托盘上的图标?
------解决方案--------------------定时切换图标...
用不着Flash...
------解决方案--------------------不停切换而已~
------解决方案--------------------几个图标不停切换,或者显示不显示不停切换~
------解决方案--------------------看到有时间.还是帮您写了一下代码...
闪烁的快慢就由Timer来控件.具体自己设...
代码如下, 复制就可以用了...
private int action;
private Icon[] flash = { new Icon(@ "F:\数据备份\TestControls\Image1.ico "), new Icon(@ "F:\数据备份\TestControls\Image2.ico ") };
private void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.action = 0;
this.notifyIcon1.Visible = true;
this.ShowInTaskbar = false;
this.timer1.Enabled = true;
}
}
private void notifyIcon1_DoubleClick(object sender, EventArgs e)
{
this.timer1.Enabled = false;
this.ShowInTaskbar = true;
this.notifyIcon1.Visible = false;
this.WindowState = FormWindowState.Normal;
}
private void timer1_Tick(object sender, EventArgs e)
{
this.notifyIcon1.Icon = this.flash[(this.action++ % 2)];
}
------解决方案--------------------记得添加Timer与NotifyIcon控件喔...
^o^
------解决方案--------------------viena() 维也纳() ( ) 信誉:100 2007-07-24 22:10:30 得分: 0
几个图标不停切换,或者显示不显示不停切换~
切换还好。这个显示不显示。那下面不乱套了。哈哈。多一个,少一个,多一个,少一个……