简体   繁体   中英

VB.NET Picturebox image from url

Im trying to load images from a url to a picturebox but I can't get it to work. The url of the page is " http://www.example.com/storage/image?12345 " but the picture box doesnt load it. And here is the source code of a page where the image are on. This is the whole code of the webpage and it's using php code that i dont have access.

<html>
   <body>
       <img style = "-webkit-user-select: none" src = "http://www.example.com/storage/image?12345">
   </body>
</html>

My question now is how can i get it to work using the given url. But when I try to get image in other website like in google image. it was working fine. i hope someone can help me out of this. thnx

I'm assuming you're using a desktop application. What you should do is to use WebClient to download the image as a byte array and then convert the byte array into a BitMap which you can assign to the PictureBox

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM