notifyIcon1.Icon = imageList1.Images[1];
这个写法肯定是不对的。只是我程序设计的这个意思,求这个正确的写法。
环境:VS2005,imageList1里面的图片是已经添加好的,也是ico格式的。

解决方案 »

  1.   

    Bitmap bmp = imageList1.Images[1];
    notifyIcon1.Icon = bmp;
      

  2.   

     System.IO.Stream ss = new System.IO.MemoryStream();
                this.imageList1.Images[2].Save(ss,System.Drawing.Imaging.ImageFormat.Png);
                this.notifyIcon1.Icon = Icon.FromHandle(new Bitmap(ss).GetHicon());
      

  3.   

     h_w_king 你太厉害了虽然最后一句  ss.close(); 大小写错了 :),但是前面语句太完美了  :P
      

  4.   

    什么啊...根本实现不了,怎么能倒入一个ico文件呢