Chapter 12. Browser Extensions

only for RuBoard - do not distribute or recompile

Chapter 12. Browser Extensions

Remember when VB 5.0 came out? It was the first appearance of the Microsoft Internet Control. A great control, really, that basically represented an instance of Internet Explorer. At the time, it seemed like there were articles everywhere exclaiming, "Write a browser in FOUR lines of code!" or "Write Your Own Internet Applications Now!" Yes, it's true, you can write a browser with just a few lines of code or create a host of other standalone Internet applications very quickly with this control. But standalone? Wouldn't it be cooler to write an Internet application that was integrated with Explorer automatically? Yes, it would, and this is where browser helper objects come in. Browser helper objects, or BHOs, are very similar to shell extensions. They run in-process to Explorer and are loaded every time a new instance of Explorer is started. But unlike shell extensions, they can perform a wide variety of tasks . You are limited only by your imagination in what you can do with BHOs. Why? Because once loaded, the BHO has full access to IE's event sink. This means that, as you surf the Internet, the browser helper is right there every step of the way. BHOs can log on to your favorite web-based email site automatically as soon as you navigate to the URL, or they can automatically retrieve information from your online brokerage account. They can do just about whatever you want them to do, because BHOs have complete access to every piece of HTML that passes through your browser. They can access it before you see it or before you leave it.

You might have seen a BHO in action if you frequently visit Yahoo! They have a toolbar that can be added to Internet Explorer called Yahoo! Companion, which provides quick access to many of the features at their web site. This component is a BHO.

We'll discuss Browser Extensions in this chapter as well. They are implemented just like BHOs, but are specific to Internet Explorer 5.0. The advantage of using browser extensions is that you can add menu items and toolbar buttons for the extension to Explorer.

Speaking of Explorer, let's clarify something at the outset: in this chapter, Explorer and Internet Explorer are the same, as far as we're concerned . Sure, there are differences between the two programs, but don't sweat the small stuff. We'll use the term Explorer to mean both programs. We can do that because browser helper objects are loaded by both of these programs. You see, the term "browser" here doesn't necessarily mean a web browser. Explorer proper is also a browser. Its tree view allows you to browse the Windows namespace. So, even though we will be discussing BHOs in the context of the Internet (and Internet Explorer) in this chapter, keep in mind that they can be written for Explorer as well.

only for RuBoard - do not distribute or recompile


Visual Basic Shell Programming
Visual Basic Shell Programming
ISBN: B00007FY99
EAN: N/A
Year: 2000
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net