|
-
Jan 15th, 2006, 11:18 AM
#1
Thread Starter
Junior Member
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
-
Jan 15th, 2006, 12:19 PM
#2
Hyperactive Member
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?
-
Jan 16th, 2006, 06:42 AM
#3
Thread Starter
Junior Member
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
-
Jan 16th, 2006, 06:47 AM
#4
Addicted Member
Re: capture a banner in webbrowser
Which browser?
For IE it may be possible with VB 6.
-
Jan 16th, 2006, 07:20 AM
#5
Hyperactive Member
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.
-
Jan 16th, 2006, 07:22 AM
#6
Thread Starter
Junior Member
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
-
Jan 16th, 2006, 07:29 AM
#7
Hyperactive Member
Re: capture a banner in webbrowser
Do you have the javascript?
-
Jan 16th, 2006, 08:02 AM
#8
Hyperactive Member
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:
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
-
Jan 16th, 2006, 08:53 AM
#9
Addicted Member
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
-
Jan 17th, 2006, 03:19 AM
#10
Thread Starter
Junior Member
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
-
Jan 17th, 2006, 03:42 AM
#11
Addicted Member
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
-
Jan 17th, 2006, 12:18 PM
#12
Hyperactive Member
Re: capture a banner in webbrowser
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
|