Does anyone have any ideas, hot to assign a picture from the net to a picture box at run time?
At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
Additional information: URI formats are not supported.
Any ideas on this?
Comments
:
: At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
:
: An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
: Additional information: URI formats are not supported.
:
: Any ideas on this?
:
:
: :
: : At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
: :
: : An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
: : Additional information: URI formats are not supported.
: :
: : Any ideas on this?
: :
: :
:
:
:
:
Try something like ...
picBox.Image = Image.FromFile("c:somepicture.bmp")
: : :
: : : At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
: : :
: : : An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
: : : Additional information: URI formats are not supported.
: : :
: : : Any ideas on this?
: : :
: : :
: :
: :
: :
: :
:
: Try something like ...
:
: picBox.Image = Image.FromFile("c:somepicture.bmp")
:
Yeah that what i was doing, the fromFile only works with local files, not URLs. But i have found a way around this, and now it works perfectly
: : : :
: : : : At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
: : : :
: : : : An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
: : : : Additional information: URI formats are not supported.
: : : :
: : : : Any ideas on this?
: : : :
: : : :
: : :
: : :
: : :
: : :
: :
: : Try something like ...
: :
: : picBox.Image = Image.FromFile("c:somepicture.bmp")
: :
:
: Yeah that what i was doing, the fromFile only works with local files, not URLs. But i have found a way around this, and now it works perfectly
:
Im pretty interested. What was your solution to the URL problem?
: : : : :
: : : : : At the moment, i can get it to display a gif located on the net, but only at design time via the image property on the properties tab. This works like a charm, but when i come to trying this at runtime, i get this message:
: : : : :
: : : : : An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll
: : : : : Additional information: URI formats are not supported.
: : : : :
: : : : : Any ideas on this?
: : : : :
: : : : :
: : : :
: : : :
: : : :
: : : :
: : :
: : : Try something like ...
: : :
: : : picBox.Image = Image.FromFile("c:somepicture.bmp")
: : :
: :
: : Yeah that what i was doing, the fromFile only works with local files, not URLs. But i have found a way around this, and now it works perfectly
: :
:
: Im pretty interested. What was your solution to the URL problem?
:
:
:
Like so:
Imports System.Net
Dim wc As New WebClient()
PictureBox1.Image = Image.FromStream(wc.OpenRead("URL"))
I was looking at much more complicated solutions, and then i spotted the webclient class, and it works like a charm, there is a very small delay when retreiving the picture.
Hope that helps
-Fallen