Results 1 to 4 of 4

Thread: take a screen pic of a certain area.

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    297

    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.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: take a screen pic of a certain area.

    Try to play with graphics.CopyFromScreen
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3
    Lively Member
    Join Date
    Mar 2009
    Posts
    79

    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.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2008
    Posts
    297

    Re: take a screen pic of a certain area.

    Quote Originally Posted by WookieVagina View Post
    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
  •  



Click Here to Expand Forum to Full Width