Results 1 to 12 of 12

Thread: capture a banner in webbrowser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    16

    capture a banner in webbrowser

    Hello

    How can I capture a part of a website in a webbrowser with width 460 and height 60. The banner is located at the bottom of the site.. and I want to capture the banner in a webbrowser
    Thank you

  2. #2
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: capture a banner in webbrowser

    I'm not sure what you want to do. Are you trying to save an image from a website?
    PHP in your FACE!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    16

    Question Re: capture a banner in webbrowser

    ok take a look here
    http://www.muzica-9.ro/
    at the bottom of the website is located a white banner where is written "Get targeted ads on your site with Google Adsense."
    So I want to display that advertise in a webbrowser. I don't know if I can ..
    Thank you

  4. #4
    Addicted Member
    Join Date
    May 2004
    Location
    Nagpur, India
    Posts
    228

    Re: capture a banner in webbrowser

    Which browser?
    For IE it may be possible with VB 6.

  5. #5
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: capture a banner in webbrowser

    I think he wants it in a webbrowser control. If I'm correct it's so that you can show ads in your program? Is it your site? If so you should have the javascript code from Google. I don't see why you'd want to put that ad in your program unless you were getting the adsense money.
    PHP in your FACE!

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    16

    Question Re: capture a banner in webbrowser

    Yes I want to display that ads in the webbrowser in vb 6.0 How is that possible to do ?
    Thank you

  7. #7
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: capture a banner in webbrowser

    Do you have the javascript?
    PHP in your FACE!

  8. #8
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: capture a banner in webbrowser

    I think you're looking for something like this. Make sure you add a reference to the Microsoft HTML Object Library

    VB Code:
    1. Private Sub Form_Load()
    2.  
    3.     AdHTML = "<script type=""text/javascript""><!--google_ad_client = ""pub-8214279179034930"";google_ad_width = 468;google_ad_height = 60;google_ad_format = ""468x60_as_rimg"";google_cpa_choice = ""CAAQq8WdzgEaCCQIMpsWzihvKNvD93M"";//--></script><script type=""text/javascript"" src=""http://pagead2.googlesyndication.com/pagead/show_ads.js""></script>"
    4.     WebBrowser1.Navigate "about:blank"
    5.     WebBrowser1.Document.Clear
    6.     WebBrowser1.Document.write AdHTML
    7.     WebBrowser1.Document.Close
    8.  
    9. End Sub
    PHP in your FACE!

  9. #9
    Addicted Member
    Join Date
    May 2004
    Location
    Nagpur, India
    Posts
    228

    Re: capture a banner in webbrowser

    I would suggest you connect to every running instance of IE.
    To do that check the code:
    http://www.freevbcode.com/ShowCode.Asp?ID=1606

    Here, you can get the events and the entire page HTML before it goes to IE.
    You can get the IE page, also called as Document.

    To get an IE page search for WM_HTML_GETOBJECT

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    16

    Question Re: capture a banner in webbrowser

    mayurvb I don't really understand what are you trying to tell me..
    Please explain to me
    Thank you

  11. #11
    Addicted Member
    Join Date
    May 2004
    Location
    Nagpur, India
    Posts
    228

    Re: capture a banner in webbrowser

    Well, for Webbrowser control, you dont need to have the complex logic i posted. I thought you want to do that with Internet Explorer. My post was based on that assumption.

    Check this link; it explains how to extract HTML from the running instance of Internet Explorer.
    http://www.experts-exchange.com/Prog..._21284960.html

  12. #12
    Hyperactive Member Datacide's Avatar
    Join Date
    Jun 2005
    Posts
    309

    Re: capture a banner in webbrowser

    Don't you have to pay for http://www.experts-exchange.com/
    PHP in your FACE!

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