Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 01:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C# NEED HELP Copy Captcha Image From WebBrowser To PictureBox

Discussion on C# NEED HELP Copy Captcha Image From WebBrowser To PictureBox within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
Unhappy C# NEED HELP Copy Captcha Image From WebBrowser To PictureBox

Hello Guys
im Trying To Make Account Maker But When Im Trying Get Captcha Image
Its Give Me Another Captcha Not Same The One In WebBrowser
Any Help ?
tariqx111 is offline  
Old 03/16/2012, 16:07   #2


 
!llu's Avatar
 
elite*gold: 90
Join Date: Oct 2011
Posts: 1,546
Received Thanks: 459
Probably you could do it with Spy++.
.Net is compatible with Spy++ so i think its working ;o
!llu is offline  
Old 03/16/2012, 16:39   #3
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
Quote:
Originally Posted by DarkAzrail View Post
Probably you could do it with Spy++.
.Net is compatible with Spy++ so i think its working ;o
Spy++ ?
What Is Spy++
tariqx111 is offline  
Old 03/16/2012, 18:06   #4


 
Al Kappaccino's Avatar
 
elite*gold: 179
Join Date: Oct 2009
Posts: 7,853
Received Thanks: 8,558
Quote:
Originally Posted by tariqx111 View Post
Spy++ ?
What Is Spy++
Google is your friend you know. It's a tool that comes with Visual Studio.

Also it would be helpful to give some informations, because YOU want help and you can't get help if you just say "it don't work".
Al Kappaccino is offline  
Old 03/16/2012, 18:29   #5
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
Why Im Ask On Here ?? = For not result in Google
tariqx111 is offline  
Old 03/16/2012, 18:42   #6


 
!llu's Avatar
 
elite*gold: 90
Join Date: Oct 2011
Posts: 1,546
Received Thanks: 459
!llu is offline  
Old 03/16/2012, 18:56   #7
 
elite*gold: 42
Join Date: Jun 2008
Posts: 5,425
Received Thanks: 1,888
Too bad spy++ has nothing to do with that problem. ;o
MoepMeep is offline  
Thanks
1 User
Old 03/16/2012, 20:56   #8
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
When I Copy It Manual From Webbrowser
And Use This
pictureBox1.Image = Clipboard.GetImage();
Fully Working
But I Want Select And Copy The Image Automatic
Help ?
tariqx111 is offline  
Old 03/16/2012, 22:40   #9


 
Al Kappaccino's Avatar
 
elite*gold: 179
Join Date: Oct 2009
Posts: 7,853
Received Thanks: 8,558
Code:
if (wb.ReadyState == WebBrowserReadyState.Complete) {
	HtmlElement captcha = wb.Document.GetElementById("yourid");
	string link = captcha.GetAttribute("src");

	System.Net.WebClient MyWebClient = new System.Net.WebClient();
	byte[] ImageInBytes = MyWebClient.DownloadData(link);
	System.IO.MemoryStream ImageStream = new System.IO.MemoryStream(ImageInBytes);

	pb.Image = new System.Drawing.Bitmap(ImageStream);
}
Al Kappaccino is offline  
Old 03/17/2012, 11:49   #10
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
Quote:
Originally Posted by JakeFrost77 View Post
Code:
if (wb.ReadyState == WebBrowserReadyState.Complete) {
	HtmlElement captcha = wb.Document.GetElementById("yourid");
	string link = captcha.GetAttribute("src");

	System.Net.WebClient MyWebClient = new System.Net.WebClient();
	byte[] ImageInBytes = MyWebClient.DownloadData(link);
	System.IO.MemoryStream ImageStream = new System.IO.MemoryStream(ImageInBytes);

	pb.Image = new System.Drawing.Bitmap(ImageStream);
}
Error : Object reference not set to an instance of an object.



EDIT : Working But Give Me Antoher Captcha Not Same The One In WebBrowser
tariqx111 is offline  
Old 03/17/2012, 12:45   #11
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
To get the captcha displayed in the browser you have to read the htmlcode of the current displayed page. Captchas are generated randomly so you will get another one in an other instance of the browser. If you want to make a good account creator use packets and abstract the unimportant things from the user. The user should see only the UI where he is able to enter name/password/emal and so on. If the user clicks on a "create" button the account creation is started.
jacky919 is offline  
Old 03/17/2012, 19:49   #12
 
elite*gold: 0
Join Date: Jul 2011
Posts: 98
Received Thanks: 12
i got it YEs YES !!
Code:
        Image Getmg()
        {
            mshtml.HTMLWindow2 w2 = (mshtml.HTMLWindow2)webBrowser1.Document.Window.DomWindow;
            w2.execScript("var ctrlRange = document.body.createControlRange();ctrlRange.add(document.getElementById('Validater1'));ctrlRange.execCommand('Copy');", "javascript");
            return Clipboard.GetImage();
        }
tariqx111 is offline  
Reply


Similar Threads Similar Threads
[C#] Dynamisches Image aus webBrowser in picturebox laden?
02/15/2013 - .NET Languages - 10 Replies
Hallo e*PvP, ich möchte ein dynamisches Bild (Captcha) aus dem webBrowser in meiner picturebox laden. Ich sitze jetzt seit 2 Stunden vor Google und finde nichts, das mir weiterhilft. Habt ihr vielleicht eine Idee? :/
[Visual Basic] Captcha in PictureBox
09/29/2011 - .NET Languages - 3 Replies
Hey , Weiß einer wie ich das Cpatcha in ne Picturebox bekomme : Html Code : <img width="200" height="70" alt="Visual verification" src="https://accounts.google.com/Captcha?ctok en=gnd9T8-d1SdHTVczUSA0aVpebLwbiRNS8d6OIxZKvJL7c_7 G--GAAdP8zqdfiDR_EXEDOzze2sWjo8VH38xGHw%3AzecW4SDR cJTsTJ1DUgBdTQ"> Ps : Ist immer nen anderer Link ...
VB captcha bild in picturebox übertragen
01/20/2011 - .NET Languages - 1 Replies
wie kann ich eine captcha von einer internet seite in eine picturebox übertragen ?
Vb Webbrowser und Image..
11/13/2010 - .NET Languages - 0 Replies
Also: Ich habe einen Webbrowser und eine PictureBox in die PictureBox soll nun ein Bild was sich immer ändert wovon ich aber die ID habe ! Wisst ihr wie ich das hinbekomme? Ich habe es hiermit Probiert Dim bild As String bild = WebBrowser1.Document.Images.GetElementsByName(&quo t;testid")
Tradeing Copy of Paly DB for a Copy of the right ACC, MSG,and NPC Servers
11/13/2008 - EO PServer Hosting - 3 Replies
Hey ill trade a copy of the Paly DB for a Copy of the Right ACC and MSG and NPC server msg me on msn [email protected]



All times are GMT +1. The time now is 01:21.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.