473,508 Members | 2,327 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 12971
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1966
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
3
29926
by: Shailaja Kulkarni | last post by:
hi All, This problem is for C# windows application. I have a user control whcih contains one picture box along with other controls. Depending on certain conditions I want to change images on the...
1
4004
by: Rhy Mednick | last post by:
I'm creating a custom control (inherited from UserControl) that is displayed by other controls on the form. I would like for the control to disappear when the user clicks outside my control the...
1
3619
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
5
5769
by: Sharon | last post by:
I’m writing a Windows application. In the form I have a Panel and inside the panel I have a PictureBox control. I’m loading the PictureBox control with BMP image that has the following...
0
3863
by: akh | last post by:
I want to use de Drag and Drop ´s event to move a picture box from a form and within a Picture Box. But I have behaviour if the MyPBox As PictureBox as the Globale varible or not Thanks for...
5
11081
by: Christopher Kurtis Koeber | last post by:
Dear All, This may sound like an elementary question but how do you implement scrollbars for the Picturebox control. Do I have to create my own code to do this or is there some property that I can...
8
1481
by: Christopher Kurtis Koeber | last post by:
Dear All, Recently I created a thread about trying to load a particular ICON image that GDI plus could not load. I realized that GDI plus definitely does not support it because it had a certain...
0
1356
by: Jerry West | last post by:
Coming from VB6 a PictureBox was a container for other controls. This doesn't seem to be the case with .NET. In light of that can someone comment on the following.... I'm creating an app that...
0
7224
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5050
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1553
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.