|
-
Mar 26th, 2010, 09:59 PM
#1
Thread Starter
Lively Member
Show picture on form from current web browser.
Hi, I have a form with a web browser on it.
The web browser has a captcha on it.
I want the captcha to be shown on the form iteself.
Maybe in a picturebox or something. But it needs to be the current picture on the web browser.
I have looked around and I couldn't find anything that could achieve this.
Help would be much appreciated! Thanks.
EDIT:
The captcha is on this website: http://passport.nexon.net/Registrati...eme=Maplestory
EDIT:
Or if this is possible, could I add the image "captchaSF_Image" to the clipboard and then paste it in the picturebox1.image? If so how could this be done?
Last edited by WookieVagina; Mar 26th, 2010 at 11:20 PM.
-
Mar 26th, 2010, 11:27 PM
#2
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
-
Mar 26th, 2010, 11:43 PM
#3
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
Okay, so this is what I tried.
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim O As Object
O = WebBrowser1.Document.Body.createControlRange()
Call O.Add(WebBrowser1.Document.All("captchaSF_Image"))
Call O.execCommand("Copy")
PictureBox1.Image = Clipboard.GetImage
End Sub
But, "createControlRange" is not a member of "Systems.Windows.Forms.HtmlElement"
does anybody know how to fix this? 
EDIT:
I also tried:
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://passport.nexon.net/Registration/Signup.aspx?nexonTheme=Maplestory")
Dim O As Object
O = WebBrowser1.Document.Body.GetElementsByTagName("captchaSF_Image")
Call O.execCommand("Copy")
PictureBox1.Image = Clipboard.GetImage
End Sub
but i got
"Object reference not set to an instance of an object."
is this because the web browser didnt finish navigating to the defined url?
Last edited by WookieVagina; Mar 26th, 2010 at 11:51 PM.
-
Mar 27th, 2010, 12:51 AM
#4
Re: Show picture on form from current web browser.
Hi.
Not in a VS machine but have you tried to pass the image directly in to the picturebox?
something like PictureBox1.Image = WebBrowser1.Document.Body.GetElementsByTagName("captchaSF_Image")
Also i haven't played with the WebBrowser control but i assume that you must provide what exactly you want from the GetElementsByTagName.
Does it have .GetElementsByTagName("captchaSF_Image").ToByteArray ?
Sorry i cannot try anything cuz as i've said i don't have vs intalled here.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 27th, 2010, 01:41 AM
#5
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
 Originally Posted by sapator
Hi.
Not in a VS machine but have you tried to pass the image directly in to the picturebox?
something like PictureBox1.Image = WebBrowser1.Document.Body.GetElementsByTagName("captchaSF_Image")
Also i haven't played with the WebBrowser control but i assume that you must provide what exactly you want from the GetElementsByTagName.
Does it have .GetElementsByTagName("captchaSF_Image").ToByteArray ?
Sorry i cannot try anything cuz as i've said i don't have vs intalled here.
Thanks but.. I get this:
Value of type 'System.Windows.Forms.HtmlElementCollection' cannot be converted to 'System.Drawing.Image'.
-
Mar 27th, 2010, 01:52 AM
#6
Re: Show picture on form from current web browser.
Play a little with the properties of GetElementsByTagName("captchaSF_Image")
Does it have GetElementsByTagName("captchaSF_Image").Value ?
GetElementsByTagName("captchaSF_Image").To...Something ?
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 27th, 2010, 02:17 AM
#7
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
 Originally Posted by sapator
Play a little with the properties of GetElementsByTagName("captchaSF_Image")
Does it have GetElementsByTagName("captchaSF_Image").Value ?
GetElementsByTagName("captchaSF_Image").To...Something ?
If I add a . to the end of it the common ones are:
Count
GetElementsByName
GetEnumerator
Item
I really don't know what to do to get this to work.
-
Mar 27th, 2010, 02:25 AM
#8
Re: Show picture on form from current web browser.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 28th, 2010, 09:37 PM
#9
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
I still don't understand how to show the image from the web browser in a picture box or something on the form.
-
Mar 31st, 2010, 12:02 AM
#10
Thread Starter
Lively Member
Re: Show picture on form from current web browser.
Is there a way to download the image to temp files and then show it in the picture box?
Please help been stuck on this for a LONG time.. Also started writing a new program and it also needs this feature. =/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|