如何使用C#.net显示动态资源图像 [英] how to show dynamic resource image using C#.net

查看:99
本文介绍了如何使用C#.net显示动态资源图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Prperties.Resources.img.Tables[0].Rows[i]["Image"].ToString();


它显示了一个错误
来自数据库的图像名称和存储在资源文件夹中的图像

如何动态使用它?


it shows an error
image name coming from the database and image stored in the resource folder

how to use this dynamically?

推荐答案

这不是您访问资源的方式.请阅读 http://www.jelovic.com/articles/resources_in_visual_studio.htm [
This not how you access resources. Please read http://www.jelovic.com/articles/resources_in_visual_studio.htm[^] for an example


这可能有帮助也是.
This may help too.
pictureBox1.Image=(Image) Resources.ResourceManager.GetObject("ImageName");


这篇关于如何使用C#.net显示动态资源图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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