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
Printable View
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
I'm not sure what you want to do. Are you trying to save an image from a website?
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
Which browser?
For IE it may be possible with VB 6.
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.
Yes I want to display that ads in the webbrowser in vb 6.0 How is that possible to do ?
Thank you
Do you have the javascript?
I think you're looking for something like this. Make sure you add a reference to the Microsoft HTML Object Library
VB Code:
Private Sub Form_Load() 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>" WebBrowser1.Navigate "about:blank" WebBrowser1.Document.Clear WebBrowser1.Document.write AdHTML WebBrowser1.Document.Close End Sub
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
mayurvb I don't really understand what are you trying to tell me..
Please explain to me
Thank you
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
Don't you have to pay for http://www.experts-exchange.com/ :ehh: