Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WebClient not supported

111 views
Skip to first unread message

Ian Jones

unread,
Feb 20, 2003, 4:17:55 AM2/20/03
to
Hi,

I am in the process of porting a Windows.NET application to PocketPC .NET.
I was disappointed to discover that the System.NET.WebClient class is not
provided and I am not sure how to implement the same functionality.
My original code was:

System.Net.WebClient wc = new System.Net.WebClient();
System.IO.Stream s = wc.OpenRead(url);
picImage.Image = Image.FromStream(s);

Basically "url" is a string containing a URI pointing to a JPG (eg.
http://www.somedomain.com/somepicture.jpg)
I want to display this image in a PictureBox. Simple, eh?

Any ideas, gratefully appreciated.

Ian Jones
Tate Bramald Limited


Alex Yakhnin [MVP]

unread,
Feb 20, 2003, 8:21:54 AM2/20/03
to
=============================================

HttpWebRequest Request = (HttpWebRequest)System.Net.WebRequest.Create(URL);
Request.AllowAutoRedirect = true;
Request.Accept = "*/*";
Request.AllowWriteStreamBuffering = true;
HttpWebResponse resp = (HttpWebResponse)Request.GetResponse();
System.IO.Stream = resp.GetResponseStream();

================================================


--
Alex Yakhnin, eMVP
Windows CE Program Manager
IntelliProg, Inc.
http://www.intelliprog.com

"Ian Jones" <fr...@bloggs.com> wrote in message
news:e9yOfFM2...@TK2MSFTNGP11.phx.gbl...

Ian Jones

unread,
Feb 20, 2003, 9:35:08 AM2/20/03
to
Excellent! Thanks very much.

Ian Jones.


"Alex Yakhnin [MVP]" <a.ya...@att.net> wrote in message
news:elOfAMO2...@TK2MSFTNGP10.phx.gbl...

0 new messages