Anybody can help me how to get this picture to my picture box in my form1?
<ul>
<li style="background: none repeat scroll 0% 0% transparent;">
<div class="serviceload">
<img src="http://website/pic/10.png" alt=""> </div>
</li>
</ul>
The problem with this picture is that it changes like every hour.
So the name of the picture changes also to blabla.png or hello.png or 2.png
I hope somebody has the time to help me out on this 1.
Thanks
I know i can do it like this:
But this gives me only 1 picture.
Code:Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load LoadWebImageToPictureBox(PictureBox1, "http://website/pic/10.png") End Sub Public Function LoadWebImageToPictureBox(ByVal pb _ As PictureBox, ByVal ImageURL As String) As Boolean Dim objImage As MemoryStream Dim objwebClient As WebClient Dim sURL As String = Trim(ImageURL) Dim bAns As Boolean Try If Not sURL.ToLower().StartsWith("http://") _ Then sURL = "http://" & sURL objwebClient = New WebClient() objImage = New _ MemoryStream(objwebClient.DownloadData(sURL)) pb.Image = Image.FromStream(objImage) bAns = True Catch ex As Exception bAns = False End Try Return bAns End Function




Reply With Quote
