如何添加PNG资源在Visual Studio 2010? [英] How to add PNG resource in Visual Studio 2010?

查看:753
本文介绍了如何添加PNG资源在Visual Studio 2010?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个PNG(即COM pressed图像),我想在我的组件(如应用程序),包括。

怎么办呢?

信息:

我尝试添加一个PNG资源,我的程序集在Visual Studio 2010中:

但没有奏效,因为Visual Studio的将其转换为一个uncom pressed位图:

除非我想添加一个PNG。

否则我1MB应用程序变得8MB

 ] === 1MB的文件大小==>
] === 8MB文件大小==============================================================================================================================================>
 

解决方案
  1. 转到项目菜单 - >属性。
  2. 选择资源标签
  3. 确保图像首先选择。
  4. 单击箭头旁边的添加资源
  5. 选择添加现有文件
  6. 找到的PNG

I have a PNG (i.e. a compressed image) that I'd like to include in my assembly (i.e. application).

How to do it?

Additional information:

I tried adding a PNG resource to my assembly in Visual Studio 2010:

But that didn't work, as Visual Studio converts it to an uncompressed bitmap:

Except I want to add a PNG.

Otherwise my 1MB application becomes 8MB:

]=== 1MB file size ==>
]=== 8MB file size ==============================================================================================================================================>

解决方案

  1. Go to the project menu -> properties.
  2. Select the resources tab
  3. Make sure Images is selected first.
  4. Click the arrow beside 'add resource'
  5. Select add existing file
  6. Find the PNG

这篇关于如何添加PNG资源在Visual Studio 2010?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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