简体   繁体   English

图片列表添加图片无法保存

[英]Imagelist add image can't save

I have an imagelist Large Icon (i added 64 image manuel) and my code success add image to my imagelist but can't save. 我有一个图像列表大图标(我添加了64个图像手动设置),并且我的代码成功将图像添加到了图像列表中,但是无法保存。 If Form close and rebuild then not listed my added image. 如果窗体关闭并重建,则不会列出我添加的图像。 How to save my added image to imagelist? 如何将添加的图像保存到图像列表?

imageList.Images.Add(someImage);

That is not meant to work afaik. 那并不意味着要工作。

You need to re-add them each time. 您每次都需要重新添加它们。

You would have to somehow add them to the exe (or a dll), meaning re-compiling it during runtime .. Tough stuff. 您将必须以某种方式将它们添加到exe(或dll)中,这意味着在运行时重新编译它。

Add the image to an application folder or maybe to a zip file to keep them in on one handy file; 将图像添加到应用程序文件夹或zip文件中,以将其保存在一个方便的文件中; re-add them all upon start-up! 在启动时将它们全部重新添加!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM