[vb.net] main shop catcha image to picturebox HELP!
Hi, i faced some errors while trying to retrieve the image from the haggle page..
Public Sub LoadImageFromUrl(ByRef url As String, ByVal pb As PictureBox)
Dim request As Net.HttpWebRequest = DirectCast(Net.HttpWebRequest.Create(url), Net.HttpWebRequest)
Dim response As Net.HttpWebResponse = DirectCast(request.GetResponse, Net.HttpWebResponse)
Dim img As Image = Image.FromStream(response.GetResponseStream())
response.Close()
pb.SizeMode = PictureBoxSizeMode.StretchImage
pb.Image = img
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
im statically retrieving image from the haggle page but it gave me the error "Parameter is not valid".
Error line:
Dim img As Image = Image.FromStream(response.GetResponseStream())
anyone can help??
i thought of another way.. which is storing all types of captcha image..then naming the file as the pet name.
Comparing the filename (kau.jpg) with the pet example: kau
"Enter the amount you wish to pay, <br>then click on the <strong>Kau</strong> to continue.<br>"