472,145 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

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 12858
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.