|
-
Mar 26th, 2010, 09:04 PM
#1
Thread Starter
Hyperactive Member
take a screen pic of a certain area.
oksice there is no way to grab an image using its source i was wondering if there is a way to taking a screen pic at a certain x,y coordinates in a webbrowser1 then displaying it in a picture box.
Thank you.
-
Mar 27th, 2010, 12:09 AM
#2
Re: take a screen pic of a certain area.
Try to play with graphics.CopyFromScreen
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Mar 27th, 2010, 12:29 AM
#3
Lively Member
Re: take a screen pic of a certain area.
hey i think we both have the same problem
did you want to get an image from your webbrowser1 and put it into your picturebox1?
cause what i am trying to do is this:
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
captchaSF_Image is the id of the picture I want in my picturebox1.
The only problem I have is that by the time I try to copy the image to my clipboard and then paste it in picturebox1 the web page isn't even finished downloading.. so there isn't even a picture there for me to get.
EDIT: Okay, I just tried making a button that I press that does all of that after the page is loaded but I get an error with my "Call O.execCommand("Copy")"
I guess I need a new method for copying the image to the clipboard. Anyone else have an idea?
EDIT: Tried "mnuCopy_Click()" didn't work.
Last edited by WookieVagina; Mar 27th, 2010 at 12:34 AM.
-
Mar 27th, 2010, 01:26 PM
#4
Thread Starter
Hyperactive Member
Re: take a screen pic of a certain area.
 Originally Posted by WookieVagina
hey i think we both have the same problem
did you want to get an image from your webbrowser1 and put it into your picturebox1?
cause what i am trying to do is this:
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
captchaSF_Image is the id of the picture I want in my picturebox1.
The only problem I have is that by the time I try to copy the image to my clipboard and then paste it in picturebox1 the web page isn't even finished downloading.. so there isn't even a picture there for me to get.
EDIT: Okay, I just tried making a button that I press that does all of that after the page is loaded but I get an error with my "Call O.execCommand("Copy")"
I guess I need a new method for copying the image to the clipboard. Anyone else have an idea?
EDIT: Tried "mnuCopy_Click()" didn't work. 
put your code on webbrowser1.document load so when the page finishes loading it takes the screenpic.
BTW. The picture im trying to get dosent have ID. so what can I do?
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
|