基本信息
源码名称:C#实现动态托盘图标源码
源码大小:0.09M
文件格式:.zip
开发语言:C#
更新时间:2020-04-14
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍

C# 实现动态托盘图标 可替换任意图像


 private void timer_Tick(object sender, EventArgs e)
        {
            //根据指定的类型依次设置相应的图标实现动态效果
            switch (type)
            {
                case 1:
                    if (c == 0) { notifyIcon.Icon = Properties.Resources.stop; c  ; }
                    else { c = 0; notifyIcon.Icon = Properties.Resources._null; }
                    break;
                case 2:
                    if (c == 0) { notifyIcon.Icon = Properties.Resources.pixel1; c  ; }
                    else if (c == 1) { notifyIcon.Icon = Properties.Resources.pixel2; c  ; }
                    else if (c == 2) { notifyIcon.Icon = Properties.Resources.pixel3; c  ; }
                    else if (c == 3) { notifyIcon.Icon = Properties.Resources.pixel4; c  ; }
                    else { c = 0; notifyIcon.Icon = Properties.Resources._null; }
                    break;
                case 3:
                    if (c == 0) { notifyIcon.Icon = Properties.Resources.circle1; c  ; }
                    else if (c == 1) { notifyIcon.Icon = Properties.Resources.circle2; c  ; }
                    else if (c == 2) { notifyIcon.Icon = Properties.Resources.circle3; c  ; }
                    else if (c == 3) { notifyIcon.Icon = Properties.Resources.circle4; c  ; }
                    else if (c == 4) { notifyIcon.Icon = Properties.Resources.circle5; c = 0; }

                    break;
                case 4:
                    if (c == 0) { notifyIcon.Icon = (Icon)Properties.Resources.arrow1; c  ; }
                    else if (c == 1) { notifyIcon.Icon = Properties.Resources.arrow2; c  ; }
                    else if (c == 2) { notifyIcon.Icon = Properties.Resources.arrow3; c  ; }
                    else if (c == 3) { notifyIcon.Icon = Properties.Resources.arrow4; c = 0; }
                    break;
            }
        }