C#资源文件
来源:互联网 发布:企业员工培训系统php 编辑:程序博客网 时间:2024/06/06 01:04
获取资源文件
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WinFormDev
{
public partial class FormResouce : Form
{
public FormResouce()
{
InitializeComponent();
}
private void FormResouce_Load(object sender, EventArgs e)
{
//获取资源文件:资源名称应为命名空间加相对路径,且资源为嵌入的资源
//获取本程序集的资源文件
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
System.IO.Stream stream = assembly.GetManifestResourceStream("WinFormDev.wait.gif");
pictureBox1.Image = new System.Drawing.Bitmap(stream);
//获取其它程序集的资源文件
assembly = System.Reflection.Assembly.GetAssembly(typeof(Components.frmGradeEditor));
stream = assembly.GetManifestResourceStream("Components.Resources.1.bmp");
pictureBox2.Image = new System.Drawing.Bitmap(stream);
}
}
}
- C#资源文件
- c#读取资源文件
- 转:C#资源文件
- c# winForm 资源文件
- C#读取资源文件
- c# 资源文件
- c#资源文件
- C# Vs2005资源文件嵌入资源使用方法
- C#下面读写资源文件
- C#中使用资源文件
- c# winForm 资源文件 相关
- C# 资源文件的创建
- C# 资源文件的使用
- C#资源文件的使用方法
- C# 资源文件的使用
- c# winForm 资源文件 相关
- C#释放资源文件dll
- C#资源文件的使用方法
- The wholly foreign-owned enterprise, will guide the domestic market
- 如何方便的建立远程链接服务器
- web developer tips (15):在ASP.NET Ajax里使用跟踪
- 关于sourceInsight3.5的缩进问题和库函数补全问题
- Composite组件的部署方法
- C#资源文件
- [转]JAVA动态代理的使用
- 关于C#多线程和进度条
- ASP.NET生成静态HTML页面并分别按年月目录存放
- 腾讯前COO告诫创业者:别做腾讯盯上的领域
- 麻雀虽小,五脏俱全:新新手,IP和Socket小知识
- LINUX中的杀掉一个进程
- VB小技巧:在VB中显示常用的符号(如欧元、人民币、正负号、度等)
- 在sql server 2005 中如何移动tempdb到新的位置