Results 1 to 4 of 4

Thread: grabing a dynamic image from webbrowser control

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    50

    grabing a dynamic image from webbrowser control

    i have been bitting around myself and i cant
    figure it out

    i need to grab a link for an image displayed in webbroswer control
    that link is dynamicly changed ever load of the page and its not an herf link so i'm having some problems with it

    i do know this
    in html the link is displayed by:
    <div id="fiexdimage" style="width:108px; height:37px; float:left;"><img src="/tools/fixed/?1687919050" alt="" align="top" /></div>

    and only the part in read changes



    any ideas anyone????

    becuase i ran out a long time a go

    thank a head.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: grabing a dynamic image from webbrowser control


  3. #3

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    50

    Re: grabing a dynamic image from webbrowser control

    thnaks it did

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2008
    Posts
    50

    Re: grabing a dynamic image from webbrowser control

    thanks it did help

    i ran this code once

    Code:
    Dim myText As String = Me.WebBrowser1.Document.Images.Item.Count
    
            MessageBox.Show(myText)
    and got the number of Images.in my example 18

    so then i ran this code once
    Code:
     For k As Integer = 0 To 17
    Dim myText As String = Me.WebBrowser1.Document.Images.Item(k).OuterHtml.ToString
    MessageBox.Show("image number" +" " + k.ToString + " " + myText)
    Next
    and i had 18 messageboxs shown and
    one of them, number 14 in my case was the Image wanted

    so now
    i ran this code

    Code:
    Dim myText As String = Me.WebBrowser1.Document.Images.Item(14).OuterHtml.ToString

    and it gives me the outterhtml of my image


    so thanks again
    for the fast and informative reply

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