开发者

Embed image in code with Visual Studio

I remember reading once that there was a way to embed an image into a code file (e.g. a screenshot or diagram) in Visual Studio, but now I can't find any reference to that feature.

Is this possible to do, or am I imagining things?

EDIT: I don't mean embed the image in the executable, for use at runtime. I mean link or embed it liter开发者_如何转开发ally in the code, for use by developers.


There is a plug-in for VS 2010 that can do this:

Plug-in


There is also a plugin for VS2012 and VS2013. At this moment installing for VS2013 does not seem to work for me though.

ImageComments extension on GitHub


You can embed images in your binary through the use of the ImageList control, which is typically used to store small icons for list controls, gridviews, etc., but could also be used for storing really any image for any purpose. A better solution would be to include a resource file and store your images there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜