469,648 Members | 1,379 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

URI Formats are not supported when PictureBox.Image Loads, How to load http images to picturebox in windows application

Dear Friends,
I am making one RSS News Reader Desktop application in c#. Where I will show
the images from website. I am generating xml file on server. like
http://www.zeetelevision.com/myxml.xml

Problem is
PictureBox1.Image =
Image.FromFile("http://www.zeetelevision.com/images/today.jpg");

Its giving me error, URI path not supported..

How should I do this. What is the right way?

Regards
Sachin Korgaonkar

--
"A life spent making mistakes is not only more honorable but more
useful than a life spent doing nothing."
--George Bernard Shaw
Nov 16 '05 #1
2 12679
Use HttpWebRequest and System.Drawing.Image.FromStream:
PictureBox1.Image
=
System.Net.HttpWebRequest.Create("http://www.zeetelevision.com/images/today.jpg").GetResponse
().GetResponseStream();
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"thedebugger" <sa***************@cyquator.esselgroup.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Dear Friends,
I am making one RSS News Reader Desktop application in c#. Where I will
show
the images from website. I am generating xml file on server. like
http://www.zeetelevision.com/myxml.xml

Problem is
PictureBox1.Image =
Image.FromFile("http://www.zeetelevision.com/images/today.jpg");

Its giving me error, URI path not supported..

How should I do this. What is the right way?

Regards
Sachin Korgaonkar

--
"A life spent making mistakes is not only more honorable but more
useful than a life spent doing nothing."
--George Bernard Shaw

Nov 16 '05 #2
Sorry;
PictureBox1.Image
= Image.FromStream(
System.Net.HttpWebRequest.Create("http://www.zeetelevision.com/images/today.jpg").GetResponse
().GetResponseStream());
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Dennis Myrén" <de****@oslokb.no> wrote in message
news:r7******************@news2.e.nsc.no...
Use HttpWebRequest and System.Drawing.Image.FromStream:
PictureBox1.Image
=
System.Net.HttpWebRequest.Create("http://www.zeetelevision.com/images/today.jpg").GetResponse
().GetResponseStream();
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"thedebugger" <sa***************@cyquator.esselgroup.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Dear Friends,
I am making one RSS News Reader Desktop application in c#. Where I will
show
the images from website. I am generating xml file on server. like
http://www.zeetelevision.com/myxml.xml

Problem is
PictureBox1.Image =
Image.FromFile("http://www.zeetelevision.com/images/today.jpg");

Its giving me error, URI path not supported..

How should I do this. What is the right way?

Regards
Sachin Korgaonkar

--
"A life spent making mistakes is not only more honorable but more
useful than a life spent doing nothing."
--George Bernard Shaw


Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Shailaja Kulkarni | last post: by
reply views Thread by akh | last post: by
5 posts views Thread by Christopher Kurtis Koeber | last post: by
8 posts views Thread by Christopher Kurtis Koeber | last post: by
reply views Thread by Jerry West | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.