如何更改图片框中的图片 [英] how to change picture in picturebox

查看:96
本文介绍了如何更改图片框中的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,晚上好

i想改变图片框的图片

i已将图片上传到visual basic的''资源'文件夹中(在解决方案资源管理器)

i只想在一个图片框中更改照片的倍数..

解决方案

如果您已将其添加为一个资源,然后尝试:

 MyPictureBox.Image = Properties.Resources.Settings。默认 .MyNewPicture 





如果你刚刚添加了文件:

 MyPictureBox.Image = Image.FromFile(  MyNewPicture.jpg


请阅读:

http://msdn.microsoft.com/en-us/library/3bka19x4%28v=vs.80%29.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/6wkcc526%28v=vs.80%29.aspx [ ^ ]

http:/ /msdn.microsoft.com/en-us/library/ytt371w5%28v=vs.80%29.aspx [ ^ ]

http://msdn.microsoft.com/en-us/library/tkkf2x4f%28v=vs.80%29.aspx [ ^ ]

hello and good evening
i would like to change the picture of the picturebox
i already upload the picture into the folder of ''resource'' in visual basic(in the solution explorer)
i would like to change a multiple of photo in just only a picturebox..

解决方案

If you have added it as a resource, then try:

MyPictureBox.Image = Properties.Resources.Settings.Default.MyNewPicture



If you have just added the file:

MyPictureBox.Image = Image.FromFile("MyNewPicture.jpg")


Please, read it:
http://msdn.microsoft.com/en-us/library/3bka19x4%28v=vs.80%29.aspx[^]
http://msdn.microsoft.com/en-us/library/6wkcc526%28v=vs.80%29.aspx[^]
http://msdn.microsoft.com/en-us/library/ytt371w5%28v=vs.80%29.aspx[^]
http://msdn.microsoft.com/en-us/library/tkkf2x4f%28v=vs.80%29.aspx[^]


这篇关于如何更改图片框中的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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