A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

Loading Capthca into Picturebox?

964 views · started by Skrillex ·
#1
Loading Capthca into Picturebox?
So for my Mule creator, I wanna make it less webbrowser GUI and more compact and smaller for everyone, so here is my code to show the image but for some reason it doesn't show it?

Am I using the wrong URL?

 If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then

For Each Captcha As HtmlElement In WebBrowser1.Document.Images

If Captcha.GetAttribute("src").Contains("http://api.recaptcha.net/noscript?k=6Lc96AAAAAAAANG1YKnED8OpogYLWtLStAMGVvv-") Then


PictureBox1.Load(Captcha.GetAttribute("src"))

End If
#2
Skrillex wrote:
So for my Mule creator, I wanna make it less webbrowser GUI and more compact and smaller for everyone, so here is my code to show the image but for some reason it doesn't show it?

Am I using the wrong URL?

 If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then

For Each Captcha As HtmlElement In WebBrowser1.Document.Images

If Captcha.GetAttribute("src").Contains("http://api.recaptcha.net/noscript?k=6Lc96AAAAAAAANG1YKnED8OpogYLWtLStAMGVvv-") Then


PictureBox1.Load(Captcha.GetAttribute("src"))

End If


Just make your code grab the URL straight off of the page, so you can be sure that you're using the correct URL each time.

Like, make it grab whatever string is in between a set of characters. For example, look at this:

<a href="http://fagswithaids.com">lol</a>

If in your code, you said "Grab everything between <a href=" and ">lol</a>, it would return http://fagswithaids.com

You could use this to grab the URL to the captcha image, and then use that URL that you grabbed to display the captcha in your program.