VS中工程图片资源文件的应用

2290阅读 0评论2013-05-07 dyli2000
分类:C#/.net

1、创建资源文件

image

image

 

2、相关的资源文件的界面介绍

image

图 资源文件可以有多种形式

 

image

图 字符串形式的资源文件

 



image

图 图片形式的资源文件

 

3、向资源文件中添加图片资源文件

image

 

image


 

 

image

图 查看源码

 

4、图片资源文件的控制中的调用

image

图 界面式调用

 

图片资源的代码式调用:


  1. public UserControl1()
  2. {
  3.     InitializeComponent();
  4.     this.button1.Image = ((System.Drawing.Image)(Properties.Resources.Icon1));
  5. }


image


图 运行效果

 

GAME OVER!

上一篇:ubuntu12系列打开终端方法
下一篇:C#Button+Label自定义控件制作