如何访问resx文件中的图像,就好像它们在数组中一样? [英] How do I access images in the resx file as if they are in an array?

查看:107
本文介绍了如何访问resx文件中的图像,就好像它们在数组中一样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个赋值程序,它使用从支持资源文件夹创建的图像数组,但我希望将它们合并到最终的exe文件中,那么如何从Resources.resx文件中创建一个数组呢?


此外,resx文件中的一个图像不正确,应该删除。我该如何删除?每次我使用Resources.resx文件尝试任何东西时,Visual Studio 2008 IDE都讨厌我!

任何知识渊博的建议都将不胜感激,谢谢。


谢谢&安培;最好的问候

[DOSrelic]
$ b $b¨`?。。。?。。。?'¨

I have an assignment program that uses an array of images that are created from a supporting resource folder but I wish to incorporate them into the final exe file so how do I make an array from the Resources.resx file please?

Also, one of the images in the resx file is incorrect and should be removed. How can I remove that please? Every time I try anything with the Resources.resx file the Visual Studio 2008 IDE hates me!
Any knowledgeable advice would be greatly appreciated, thanks.

Thanks & Best Regards
[DOSrelic]
¨`?._.?._.?′¨

推荐答案

你在使用VS所做或正在尝试直接编辑文件的资源管理内容吗?
Are you using the resource management stuff that VS does or are you trying to directly edit the file?


嗨Plater,VS做的资源管理内容但似乎没有删除图像的能力。我目前将它们从文件加载到数组中,因为我不知道如何使用VS方式所以程序需要它自己的资源子文件夹,谢谢。
Hi Plater, The resource management stuff that VS does but there does not seem to be the ability to remove an image. I currently load them from files into an array as I don''t know how to use the VS way so the program requires it''s own resource sub-folder, thanks.


你好我刚刚开始使用Csharp并使用包含卡片所有图像的文件夹编写了一个混乱但可用的存储卡游戏,但我真的希望能够通过项目资源文件将它们存储在可执行文件中。我可以加载资源文件,但不知道如何检索它们以将它们分配给新创建的卡类对象。

而不是行:

static Bitmap _back =新的位图(AmemoryGame .cardBackFileNames [0]);

我应该用什么?我想我会使用ResXResourceReader resxReader = new ResXResourceReader(...)然后意识到我甚至不知道文件的名称!

任何人都可以给我一些指导如何要访问我的resx资源文件图像吗?任何知识渊博的帮助都会非常欢呼。
Hi there I have just started with Csharp and wrote a messy but usable memory card game using a folder with all the images of the cards but I really want to be able to store them in the executable via the project resource file. I can load the resource file but do not know how to retrieve them to assign them to the newly created card class objects.
Instead of the line:
static Bitmap _back = new Bitmap(AmemoryGame .cardBackFileNames[0]);
what should I use please? I sort of figured that I would use ResXResourceReader resxReader = new ResXResourceReader(...)but then realised I didn''t even know the name of the file!
Can anyone give me some guidance on how to access my resx resource file images please? Any knowledgeable help would be greatly cheers.


这篇关于如何访问resx文件中的图像,就好像它们在数组中一样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆