Use the Image.FromStream method.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
Kevin,
Thanks for the reply. Maybe if I post some code you will have a better
understanding as to what I want to do.
CODE:
Imports System
Imports System.Net
Imports System.Drawing
Imports System.Drawing.Image
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
'create the web request
Dim wr As WebRequest =
WebRequest.Create("http://localhost/eventcalendar/calHome.aspx")
'get the response into a stream
Dim st As Stream = wr.GetResponse.GetResponseStream
'create the image
Dim bm As Image = Image.FromStream(st)
End Sub
End Class
The last line where I am using Image.FromStream is throughing an error
"Parameter is vot valid".
I am guesing that I have to get the data into a browser control, then copy
the contents of the browser to the clipboard and create my image that way. Is
it possible to do something like that?
> Use the Image.FromStream method.
>
[quoted text clipped - 8 lines]
> > Any help will be much appreciated. If anyone knows of any articles, etc
> > please forward. Thanks.
Kevin Spencer - 30 Mar 2006 17:53 GMT
It doesn't look to me like you're requesting an image. It looks like you're
requesting an ASPX page.

Signature
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
> Kevin,
> Thanks for the reply. Maybe if I post some code you will have a better
[quoted text clipped - 46 lines]
>> > Any help will be much appreciated. If anyone knows of any articles, etc
>> > please forward. Thanks.
alantolan@users.com - 31 Mar 2006 01:39 GMT
You shouldn't have to display in the browser and copy to clipboard. It
is possible to create an image directly from the web stream as long as
the stream represents an image. I have done it before with a URL that
denoted an jpeg
Try placing a jpeg on the server and downloading it. If it works, then
the problem is the aspx.
hth,
Alan.