怎么取出放入Imagelist控件中的图标
1个回答
2017-06-01
展开全部
不会将favicon.ico换成favicon.jpg或favicon.bmp啊…………将其它PICBOX控件里的图片路径取出存入imageList即可。msdn中的实例:C#复制代码internalSystem.Windows.Forms.ImageListImageList1;//CreateanImageListObject,populateit,anddisplay//theimagesitcontains.privatevoidButton1_Click(System.Objectsender,System.EventArgse){//ConstructtheImageList.ImageList1=newImageList();//SettheImageSizepropertytoalargersize//(thedefaultis16x16).ImageList1.ImageSize=newSize(112,112);//Addtwoimagestothelist.ImageList1.Images.Add(Image.FromFile("c:\\windows\\FeatherTexture.bmp"));ImageList1.Images.Add(Image.FromFile("C:\\windows\\GoneFishing.bmp"));//GetaGraphicsobjectfromtheform'shandle.GraphicstheGraphics=Graphics.FromHwnd(this.Handle);//Loopthroughtheimagesinthelist,drawingeachimage.for(intcount=0;count
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询