在项目中添加目录,“ToolboxBitmap”失败! [英] Add directory in the project,"ToolboxBitmap" failure!

查看:73
本文介绍了在项目中添加目录,“ToolboxBitmap”失败!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在项目中添加目录(添加Image目录),ToolboxBitmap失败!

示例:

[ToolboxBitmap(typeof(LiveVision),相机。 bmp)]没关系



[ToolboxBitmap(typeof(LiveVision),Image.Camera.bmp)]是NG



尝试很多方法。没有解决方案。

Add directory(add "Image" directory) in the project,"ToolboxBitmap" failure!
example:
[ToolboxBitmap(typeof(LiveVision), "Camera.bmp")] is OK

[ToolboxBitmap(typeof(LiveVision), "Image.Camera.bmp")] is NG

try many methods.there is no solution.

推荐答案

首先,您使用的是嵌入式资源中的图像。将图像添加到资源时,请使用添加现有文件。该文件将添加到项目中引用的相应项目中,并在资源文件中引用。然后查看自动生成的文件并找到有问题的字符串。没有你的形象,改变就是一个简单的名字。前缀(为什么?你从哪里得到它?)。



请参阅: https://msdn.microsoft.com/en-us/library/eth0sx9d%28v=vs.110%29.aspx [ ^ ]。< br $> b $ b

-SA
First of all, you are using the image from embedded resource. When adding images to resource, use "Add Existing files". The file will be added to appropriate project, referenced in the project, and referenced in the resource file. Then look at the auto-generated file and find the string in question. Changes are, it will be a simple name, without your "image." prefix (why? where did you get it?).

Please see: https://msdn.microsoft.com/en-us/library/eth0sx9d%28v=vs.110%29.aspx[^].

—SA


SA:

哈哈谢谢,据说你的提示,我已经知道该怎么做了。但是如何在'Resources.resx'文件中添加一个文件夹?

(因为bmp文件太多了,我想分类管理)
SA:
haha thank,according to the tips of your,i already know how to do. but how to add a folder int the 'Resources.resx' file ?
(Because bmp files too many, i want to classification management)


这篇关于在项目中添加目录,“ToolboxBitmap”失败!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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