动态设置的WinForms应用程序一个PictureBox的图像? [英] Dynamically set Image of a Picturebox in winforms applications?

查看:237
本文介绍了动态设置的WinForms应用程序一个PictureBox的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到application.startuppath像下面;

  

C:\ Documents和Settings \ AJU \我的文档\ Visual Studio中   2010 \项目\ gManager \ gManager \斌\调试

和我有一个形象在这里为图片框设置  .. \图片\ Image1.jpg

我应该怎么做的PictureBox的图像属性设置?

解决方案

  pictureBox1.Load(path_to_picture)
 

I gets the application.startuppath like below;

C:\Documents and Settings\aju\my documents\visual studio 2010\Projects\gManager\gManager\bin\Debug

And i have a image here to set for picturebox ..\Images\Image1.jpg

what should i do to set the image property of picturebox ?

解决方案

pictureBox1.Load(path_to_picture)

这篇关于动态设置的WinForms应用程序一个PictureBox的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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