Hey
Okay, so I had this idea for the program Web Spydr even though it's on hold. But I'm testing some new things. I thought it would be possilbe to be able to add a url image into a image list then assign the listview control with the image list.
Here's the code: basically there's a testbox control, a list viewcontrol, a button control and a web browser control. I'm using httpgetresponse from system.net
So, the test is to type in a url tha thas a image such as
http://www.sillypsace.com/sillyimage.jpg you know? Then add it into the image list that's created with a New instance then transfer the image from the image list into the list view box. Also, you can see that I took some samples from Web Spydr and did the same thing when it requests the image height etc..
CODE
Dim ImgList As New ImageList
Dim ImageURL As String
ImageURL = TextBox1.Text
WebBrowser1.Navigate(ImageURL)
Dim img = Net.HttpWebRequest.Create(TextBox1.Text).GetResponse.GetResponseStream
ImgList.Images.Add("test", System.Drawing.Bitmap.FromStream(Net.HttpWebRequest.Create(TextBox1.Text).GetResponse.GetResponseStream))
ListView1.Items.Add(TextBox1.Text)
ListView1.Items.Item(0).ImageKey = img.ToString
The error says
QUOTE
A first chance exception of type 'System.Net.ProtocolViolationException' occurred in System.dll
Any suggestios? Thanks guys!
-3v0lut10n aka Pau1