动态取出资源里面的图片 我在资源(resources)里面添加了24张BMP格式的图片,现在需要在一个pictruebox控件里面显示出来,但是获取资源里面的图片pictureBox1.Image = Properties.Resources.image001;这样只能单个获取,我怎么才能动态的获取呢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 private System.Drawing.Bitmap GetResourceBitmap(string strImageName) { object obj = Properties.Resources.ResourceManager.GetObject(strImageName, Properties.Resources.Culture); return ((System.Drawing.Bitmap)(obj)); } private System.Drawing.Image GetResourceImage(string strImageName) { object obj = Properties.Resources.ResourceManager.GetObject(strImageName, Properties.Resources.Culture); return ((System.Drawing.Image)(obj)); }//动态取pictureBox1.Image = GetResourceImage("image001"); Bitmap bmp = Properties.Resources.ResourceManager.GetObject("image001") as Bitmap; 大数据处理,多线程的问题 谁用过TortoiseSVN结合codeplex c#如何把二进制数据转化为int类型 打印王后的攻击线 怎样让Textbox失去焦点后立刻检测是否符合某个正则表达式 急求 测量 ZedGraph 两坐标间的距离 超级笨苯问题(在线结帖!!!) (为了未来的IT业 敬请高手加入我们) 欢迎加入.NET高手与高手成长群:14282006 呵呵 关于字符串分组之后的问题!!! 开发页面都用什么控件(是web控件还是html的控件) 用C#直接写Transaction的问题 请教C#窗体应用程序中如何做出一个类似表格类型的输入界面?
{
object obj = Properties.Resources.ResourceManager.GetObject(strImageName, Properties.Resources.Culture);
return ((System.Drawing.Bitmap)(obj));
} private System.Drawing.Image GetResourceImage(string strImageName)
{
object obj = Properties.Resources.ResourceManager.GetObject(strImageName, Properties.Resources.Culture);
return ((System.Drawing.Image)(obj));
}//动态取
pictureBox1.Image = GetResourceImage("image001");