Home

Explorer Bar Maker

v 3.01

Contents:

 

 

 Introduction

You don't have to be a programmer to create your own Explorer bar.

Explorer Bar (Band) Maker is a Windows tool (one-step wizard) that lets you create your own Explorer bar from any HTML page, picture or Macromedia Flash file.

Usually, making Explorer bars includes COM programming, that can be complex and confusing. This work has done for you. Now, making a new bar is so easy as selecting a file.

An Explorer bar (band) is a panel like the Favorites, History or Search panels that you see in your Internet Explorer (IE) or Windows Explorer.

An Explorer bar can be an excellent solution for setting the things in the right order in the Intranet inside your organization. Or, you can create new panels to explore Internet, or to advertise you products and services. Your homemade bars can enhance and personalize your working place, make it more convenient as well as amusing and funny.

 Types of the bars

There are 3 types of Explorer bars:
1. Left-side bar 2. Tool bar 3. Bottom-side bar
looks like
the Search bar.
is like the Address or Links bar. You can see an example of the bottom bar, if you chose "Tip of the day" from the IE Help menu.
Download Download Download

How to show a bar

After installation of the program, you have to restart your computer. If it's already done:

Click at one of the following buttons.

(You can see an Alert Message. Allow ActiveX to run.);

      

OR

In the IE menu select:

View->Toolbars->My Toolbar

View->Explorer Bar->My Left-side bar (or "My Bottom-side bar")

If My Bar Is Not Listed In The Menu Items

OR

click on a Button  (or   ) on the Standard Buttons panel.

To make the buttons   available

Start IE and right click on the Standard Buttons toolbar, Select "Customize" from the context menu.

Scroll down the Available toolbar buttons listbox and find "My Left-side (Bottom-side, Tool) Bar" item.

Select it and click the Add button in the middle of the dialog. The item will move to the right. Click the Close Button. You'll see the button added as shown.

After the installation you will see the default bar ("My first bar"). This page (default_bar.htm) was made to give an example, which you can use for making your own bar pages.

 How to make your own bar

Start the program "set_bar".

1 . Title. This field must be filled. This is the text of the IE menu item.

2 . BarLabel. This text will appear on your bar itself. Can be blank.

3. File location. Click the Browse button [...] and select a file.

The file can be on your computer or on the Internet. In case of Internet you should write something like "http://youraddr... ".  It can be any HTML page, a picture (GIF,JPG,BMP,PNG..), text file (TXT) or  Macromedia flash file (SWF).

If you leave this field blank, the default page ("My first bar") will be used as your bar. This page (default_bar.htm) was made to give an example, which you can use for making your own bar pages.

4. ButtonText.  This is a text for the button (and the button hint) of your bar.

5. Icon and HotIcon. These fields contain file names (*.ico) of images of the button. They can point to the same file. Can be blank. In this case the default icons (Icon.ico and HotIcon.ico) will be used.

6. Click the button [InstallBar].  The values will be saved into the file TR_MyBars.ini, and your bar will be installed.

 

The button[Save] is to save data into TR_MyBars.ini, without installing your bar.

[UninstalBar] is to uninstall the bar.

[Help] is to get help.

Note.

Instead of using this dialog, you can edit the file TR_MyBars.ini with any text editor. Please, don't change the fields, which are not listed in the dialog.

 

 How to install your bar on another computer (deployment)

Let's assume your bar is called Mybar.htm.

Preparation of files

A) Launch the program set_bar.

Change the fields "File location", "Icon" and "HotIcon".

The field "File location" must contain Mybar.htm, without path (unless the file is on the Internet).

The fields "Icon" � "HotIcon" must also have file names without paths.

Click the button [Save].

Close the dialog.

B) Make a new directory. For example -  c:\MYDIR. This folder is only to gather all the necessary files together. Not for installing or testing.

C) Copy the following files into the folder c:\MYDIR:

Necessary files:

1. Mybar.htm - your panel and all other necessary files (pictures etc.). If the files is on the Internet, you needn't copy them.

2. MyIcon.ico - your icon for the bar button.

3. MyHotIcon.ico - the hot icon for the button.

4. TR_MyBars.ini

5. TR*Bar_.dll 

6. InstallBar.exe

Additional files:

7. UninstallBar.exe - If you include this file, a user will be able to uninstall your bar.

8. set_bar.exe - The user can adjust your bar.

9. unlock.txt  - Include this file, if you want your panel to work for unlimited period of time. If you don't include this file - your bar will work for 30 days (So, it will be a trial version of your bar).

To make this file, save your registration letter as a text file under the name "unlock.txt".

This file will be deleted from the target computer after installation of your bar.

10. BarHelper.dll - Include this file, if you use BarHelper functions.

11. Readme_bar.txt - We will appreciate it, if you include this file. Just a bit of advertising.

You can find these files in the folder where the program is installed.
The default location is:
C:\Program Files\Text-Reader programs\My***bar\

 

Please, check again, the fields "File location", "Icon" � "HotIcon" in the file TR_MyBars.ini must not contain paths.

Installation on a target computer

To install your panel, you need copy all the files  from the folder c:\MYDIR into any folder on another computer and start the program InstallBar.exe

The user will have to restart his computer.

If you included the file unlock.txt into your package, and the program is unlocked successfully, this file will be deleted.

You can pack your files with many popular programs, like WinZip Self-Extractor (www.winzip.com) or Setup Generator  (www.gentee.com) , or InstallMaster etc. Such programs can not only create self-extracting archives, but also execute the program "InstallBar.exe", after unpacking the files.

Testing

Take the same steps as for installation. Copy the files from c:\MYDIR into any directory on your computer, and launch "Installbar.exe" from this directory.

 

 About the files

The following files can be found in the folder where the program is installed.
The default location is:
C:\Program Files\Text-Reader programs\My***bar\

InstallBar.exe

This is an installation program for your panel. It reads the file "TR_MyBars.ini" and adds the information into the Windows registry.

Every time you start this program, it shows the message "Please, restart your computer". If you have already restarted your computer, you needn't do it again. Just restart Internet Explorer.
To suppress this message, launch the program with command line parameter "nomessage".

If the file "unlock.txt" is in the same folder, InstallBar.exe unlocks your panel (removes time limitations) and erases the file "unlock.txt".

UninstallBar.exe

UninstallBar.exe is to uninstall your panel. It removes the data related to your panel from the Windows registry. It does not delete any files.

set_bar.exe

Set_bar.exe is an editor of the file TR_MyBars.ini. You can change this file with any text editor. After saving the file, in order to install your panel, you have to launch the program InstallBar.exe

TR_MyBars.ini

This file contains information which is necessary to install your bar.

The field "Title" must not be blank. This is the name of the IE menu item.

The field "BarLabel" contains the text, which will appear on your bar. Can be blank.

The field "File location" should contain the file name of your bar. 

If the file name does not contain path, the program will search this file in the current folder (where the program is installed).
If you leave this field blank, the program will use the file "default_bar.htm", which must be in the same folder.

The fields "Icon" and  "HotIcon" should contain names of icon files (*.ico) without paths, which will be used as button images of your bar.

If the names do not contain paths, the program will search these files in the current folder.
If the fields are blank, the program will use the files "Icon.ico" and  "HotIcon.ico", which must be in the same folder. Recommended size of the icon images is 20x20 px.

Please, do not change the fields, which you can find in the file TR_MyBars.ini, and which are not in the dialog  set_bar.

unlock.txt

This is your registration letter saved as a text file. It's used to unlock your panel (remove time limitations) on a target computer. When you launch the program InstallBar.exe, and if your panel is unlocked successfully, this file will be deleted.

 

 For HTML page designers

 Access to the loaded page

Every time a new page is loaded into the browser, the program calls the function IEDocumentComplete (ie) on your bar pageThe argument ie is "InternetExplorer Object" of the browser.

You can use ie object to obtain a "document" object of the loaded page, read and any variables on the loaded page, call functions, change text of the page etc.

So, if you want to manipulate the loaded page, you have to add this function to any script block on "MyBar.htm".

IEDocumentComplete is called before the event "window_onload" of the loaded page.

It's much easier than it sounds. Just add this function into a script block on your page MyBar.htm.

<script language=javascript>

//the global variable for InternetExplorer Object
var IEexplorer=null; 

function IEDocumentComplete (ie){
IEexplorer=ie;
}


That's it. Now you can make a lot of things with your instance of Internet Explorer. You can navigate the browser, hide or show other bars or bands ( menu panel, address bar, status bar etc).

For example, to navigate the browser, do the following

IEexplorer.Navigate (http://www.text-reader.com);

To get more information on what you can do with your browser please have a look at "InternetExplorer Object" at http://msdn.microsoft.com .

If you want to read or modify the loaded page, you have to get the "document" object of the page. If you have this object, you can do everything you want to the page (read, write, analize, change, assign events, etc.) .

To obtain the "document" change the previous example as shown:

<script language=javascript>

//the global variable for InternetExplorer Object
var IEexplorer=null; 

//the "document" of the loaded page
var IEdocument=null;

function IEDocumentComplete(ie){
IEexplorer=ie;
try {
     IEdocument=IEexplorer.Document;
    }catch(e){}
}

Please, note: I used a try...catch block. Always use this block when you work with IEdocument. Some pages may not have the "document", the page can be unloaded etc. You should use it to avoid unexpected error messages, unless you are debugging your bar.

From this moment you can do everything with the loaded page. If the page contains a variable:

var PageVar="hello";

and a function:

function PageFunc(s){
alert (s);
}

 

you can show and set the variable var1.

//Show the initial value of PageVar ("hello")
alert (IEdocument.parentWindow.PageVar)

// assign a new value
IEdocument.parentWindow.PageVar=window;

Now PageVar contains the "window" object of MyBar.htm. So, the loaded page can do anything with your bar.

You can call the function PageFunc().

IEdocument.parentWindow.PageFunc("hello from my bar");

When you hide your Explorer bar, another function IEDocumentDisconnect is called. And you can do something like this:

function IEDocumentDisconnect(){
IEdocument=null;
}

Though, it is not necessary.

 

 More examples

To navigate the browser

function GoHome(){
IEexplorer.Navigate("http//www.text-reader.com");
}

or you can make a link like this:

<a href="javascript:GoHome()">Text-Reader home</a>

or like this:

<a href="javascript:IEexplorer.Navigate('http//www.text-reader.com');">Text-Reader home</a>

To color the page

function ChangeColor(){
IEdocument.body.style.backgroundColor='gold';
}

To change the page

function AddSomethingToPage(){
IEdocument.body.innerHTML+="Hello world!";
}

To show the page title

function ShowTitle(){
alert (IEdocument.title);
}

You can have a look at the page default_bar.htm to see a real working example.

 BarHelper (NEW)

BarHelper is a library with additional functions. To use BarHelper on your bar page you have to add the following strings to your script:

var HELPER=new ActiveXObject("BarHelper.helper");

function Permit()
{
  window.status="H-PERMIT";
  window.status="";
}

Now, for example, you can write a file:

Permit();
HELPER.WriteFile("c:\\MyFile.txt","Hello World" );

Or read it:

Permit();
var text=HELPER.ReadFile("c:\\MyFile.txt");

Write a string to INI file

Permit();
HELPER.WritePrivateProfileString("SECTION1","KEY5","Hi!","c:\\MyBar.ini");

Show Color dialog

var color=HELPER.ColorDialog("#FF0000");

or run another programs, like Calculator.

Permit();
HELPER.Execute( "open", "notepad.exe", "", "", "SW_SHOWNORMAL");

If you want to distribute your bar, you have to include "BarHelper.dll" into your installation package.

You can write and read files, work with INI files, execute another programs etc. To get more information, please read BarHelper documentation

 

 Frames

When a loading page has frames, IEDocumentComplete will be called for each frame. If you want to get the top page (which contains the frames), you should check the "window object" of a loaded page (or frame).

if (IEwindow == IEwindow.top) 


Here is an example.

<SCRIPT language="javascript">

//***************************
// You need these variables and function to get
// the window object of the loaded page
//******************************

// this variable contains pointer to "InternetExplorer object"
var IExplorer=null;

//contains "document object" of a loaded page
var IEdocument=null;

//"window object" of a loaded page
var IEwindow=null;

// This function will be called after a page is loaded into the browser
function IEDocumentComplete(ie) {
IExplorer=ie;

/*
this "try" is necessary to prevent errors 
when a loaded page doesn't have "document" or something goes wrong.
You can't foresee all cases, especially when a User loads not yours pages. You should use "try..catch" block every time you use IEdocument or IEwindow, unless you are debugging your bar.
*/

try 
  {
  IEdocument=IExplorer.Document; //get document object
  IEwindow=IEdocument.parentWindow; //get window object

 // The loaded page can contains frames.
 // So, you should check
 // whether the loaded page is the top page.

     if (IEwindow == IEwindow.top) 
     {
     //do something here....
     //for example:
      var N=IEdocument.frames.length;
      alert ("this page has " + N + " frames");
      }

  } catch(e){}

}


</SCRIPT>

 

 

 Input fields and keys DEL and BACKSPACE

If you want to use the input fields like this:

<INPUT type="text">
<INPUT type="file">
<INPUT type="password">
<TEXTAREA></TEXTAREA>

you should know, the keys  DEL � BACKSPACE will not work in these fields.

It's because Internet Explorer sends this keys into the main browser window.

To resolve the problem

You should add several strings: event handlers (onclick ,onfocus and  onblur) for the field, and a script block. All together should look like this:

<INPUT type="text" onclick="KeysON()" onfocus="KeysON()" onblur="KeysOFF()">

<SCRIPT>

function KeysON(){
status='FOCUS';
status='';
}

function KeysOFF(){
status='BLUR';
status='';
}

</SCRIPT>

 

Attention:

If you added the event handler onfocus, don't forget to add the event handler onblur. Otherwise, a user will not be able to use the keys DEL and BACKSPACE in the main browser window.

A little bug

If a user sets the focus into such a field, and don't click anywhere else (on your bar or in the main browser window), but right after that tries to close the browser window, he will need click twice instead one time. Though, it's comparatively rare situation. Usually, after entering some text, the user have to click some button (like [Search] etc.), or click the link, or go to another page.

 

 

 Forms

You can have input fields on your bar. And a user can send request to your server.

Usualy fields are included into a form:

<!-- this form will not work-->

<FORM method="GET" action=http://yourUrl>
  <INPUT TYPE="text" NAME="txt1">
  <INPUT TYPE="submit" value="Send">
</FORM>

This form will not work.

To make a bar take the following steps:

1. Don't include fields into FORM, and use attributes ID instead of NAME

  <INPUT TYPE=text ID="txt1">
  <INPUT TYPE=button value="Send" onclick="DoRequest()">

2. Now, you have to construct a request to the server. Add the function DoRequest into any script block.


function DoRequest() {
varRequestString="http://www.google.com/search?q=" + txt1.value;
IExplorer.Navigate(RequestString);
}

This function sends a GET-Request to the GOOGLE server.  If you prefer a POST request, please read documentation on Navigate2 method  of "InternetExplorer Object" at http://msdn.microsoft.com .

To get a working example of a "form" bar, please download additional examples (Subfolder "forms").

 

 

 If you want to have several bars

Make a simple links on your page MyBar.htm like this:

<a href="c:\MyBar2.htm" >Second bar</a>

If you click on it, the page MyBar2.htm will be loaded, and you'll see the page MyBar2.htm in the place of your initial Explorer bar. MyBar2.htm can be on the Internet (href=http://www.your..).

The program remembers the last loaded Explorer bar. So, next time you start the browser you'll see the second page. You can have a system of links on your bar that load another bars, and have as many bars as you wish.

 Status commands (NEW)

You can not see the status line of your Bar. But, you can change it from your script. If you change the status line as shown below, you can do the following things:

Show "About" dialog

window.status="ABOUT";
window.status="";

Note. In the second line, I made status="".
Always do it. If you don't do it your bar can show "About" dialogs one after another (continuously).

Show "Registered to" dialog

status="REGISTEREDTO";
status="";

Make your bar receive key events. (please read "Input fields and keys DEL and BACKSPACE")

status="FOCUS"; //or "BLUR"
status="";

Load your local bar "MyBar.htm" (located on your hard drive).

status="LOADBAR:YourBarName.htm";
status="";

Note. "MyBar.htm" must be placed into the folder where My*bar_.dll is. You can use this feature to switch from a bar located on the Net to your bar located on your computer. So, you can have your bars located both on the Internet and on your hard drive, and easily switch between them (please read "If you want to have several bars"). If all your bars are on your hard drive, you don't need this command.


 

 Some style tips

To make the color of your bar the same as the color of a standard  Windows panel:

<body style="style="background-color: buttonface;">

To remove margins from page:

<body style="margin:0px">

To remove scroll bars:

<body scroll=No>

To make the cursor like an arrow:

<body style="cursor: default">

You can also suppress the context menu, and prohibit selecting:

<body language="javascript" oncontextmenu="return false;" onselectstart="return false;" >

All together:

<body language="javascript" oncontextmenu="return false;" onselectstart="return false;" scroll="no" style="BACKGROUND-COLOR: buttonface; CURSOR: default; FONT-FAMILY: Verdana, sans-serif; FONT-SIZE: 12px; MARGIN: 0px">

 Additional examples

Please download additional examples. Please read  comments on the pages.

 Additional information

System requirements.

Windows 98,2000,NT,XP.
Internet Explorer 5, 6.

Registration

To get information about your trial period click the link "Registered to..." on the default bar.

If you want to use the program after the trial period, or distribute your bar, you have to register your copy of the program.

Register your copy of the program here.

Feedback

The author of the program will be grateful for any response, that you can leave on the site: www.text-reader.com .

To get technical support please e-mail: [email protected]

Links

You can get full information about IE toolbands at Microsoft MSDN site:

http://msdn.microsoft.com/

 

Other  Text-Reader programs

Home


KeyWords:
Creating DeskBands an ATL Object Wizard COM ActiveX javascript html download toolbar windows session toolband band bar programming program ATL WTL free text-reader text reader tool read maker explorer internet bottom-side explorerbar explorerband HTML XML DHTML vbscript internet explorer explorer webbrowser browser web control internet intranet custom homemade DeskBand IE Web Accessory