Custom Internet Explorer bars and advanced IE bars
developed for IE 11 - IE 6 in VB.NET, C# or C++
Add-in Express Home > Add-in Express for Internet Explorer > Online Guide > Building Explorer bars
Custom Explorer bars
With Add-in Express for Internet Explorer you can build custom Explorer bars for IE6, IE7, IE8 and IE9. Add-in Express provides 2 ways:
This pages describes the development of:
Building custom Explorer bars
The newly created IE bar has the command button (unavailable in IE6) and / or menu item associated with the IE bar; the user shows / hides the bar by clicking on either of them.
The ideology of creating custom Explorer bars is similar to that of IE toolbars. Note however that you need to have administrative permissions in order to install an IE add-on that shows your IE bar. At the same time, the Add-in Express IE Bar project allows developing an IE bar installable by the standard user. Also note that the BHO part of an Internet Explorer add-on can switch your IE bar on when Internet Explorer starts - this is why Add-in Express provides the LoadAtStartup property; the same isn't possible with the IE bar developed with the Add-in Express IE Bar project.
If you develop an Add-in Express IE add-on, a custom Explorer bar is built in two easy steps: first, you add a special component derived from System.Windows.Forms.UserControl to your project, then you add an item to a collection of the IE module and, in the item's properties, you bind the component to the item.
Let's start: choose Project | Add New Item in the main menu of VS and find the corresponding class template in the Add-in Express Items / Internet Explorer branch.
This adds a descendant of ADXIEBar (it represents an Internet Explorer bar) to your project.
Now you add an item to the Bars collection of the IE module and specify its properties. The most important one is BarType; it binds a bar component to the bar item (ADXIEBarItem). You can also choose whether to show the bar vertically or horizontally and specify the maximal width or height of vertical and horizontal bars respectively. The properties having "ToolButton" in their names, such as AddToolButton and ToolButtonDefaultVisible, control the visibility and other aspects of the button that shows / hides the Explorer bar; the button is added to the Command Bar toolbar of Internet Explorer.
Here are ADXIEBar events listed in the order corresponding to the life-cycle of the Explorer bar:
Because ADXIEBar is a descendant of UserControl, you can react to, say, resizing of the Explorer bar.
ADXIEBarItem provides the following properties:
On using Advanced IE Bars
As you may happen to know, IE bars have several limitations. For instance, they require creating registry keys in order to be ever displayed. This means you cannot create an IE bar on the fly. To bypass this and other restrictions of Internet Explorer bars, you use Advanced IE Bars by Add-in Express.
When using the Advanced IE Bar technology you will have the following components in your code:
To use the components listed above, you add an Advanced IE bar to your IE Module based project.
Then, you add an Advanced Bars Manager onto the designer surface of the IE module in your project.
Finally, you add an item to the Bars collection of the Advanced Bars Manager and set the item's properties.
Advanced Bar pros and cons
Showing / hiding Advanced IE Bar
When a new Internet Explorer tab opens, the Advanced Bars Manager gets all enabled items from its Bars collection and raises the OnCreateBarInstance event for each of them; if the end user has chosen not to show the bars, they are excluded from the sequence, too.
If you don't cancel the OnCreateBarInstance event, the manager creates an instance of the Advanced component specified in the ADXIEAdvancedBarItem.BarType property. Before the bar is shown, the OnBarBeforeShow event of the Advanced IE bar occurs. You can cancel this event, too.
Similarly, you can prevent the Advanced IE bar from being closed by the user - you'll need to cancel the OnBarBeforeHide event.