从URL加载图像插入一个图片图像、加载、图片、URL

2023-09-03 02:20:50 作者:青涩年华

我想将图像加载到一个图片框。这是我要加载的图像:http://www.gravatar.com/avatar/6810d91caff032b202c50701dd3af745?d=identicon&r=PG

I want to load an image into a PictureBox. This is the image I want to load: http://www.gravatar.com/avatar/6810d91caff032b202c50701dd3af745?d=identicon&r=PG

我如何做到这一点?

推荐答案

内置的 PictureBox.Load(串的URL)方法的设置ImageLocation到指定的URL并显示图像表示。 (由于.NetFramework 2)

The inbuilt PictureBox.Load(string URL) Method "sets the ImageLocation to the specified URL and displays the image indicated." (Since .NetFramework 2)