make internet explorer toolbar/button


I've found some code (here and in other places) to make internet explorer toolbar/button, but it is all for VB 6 and none for

Does anyone have a class for to add button/toolbar to ie that works with 2003?

That person might also have an answer to this: how can you after starting your application from the ie button read the url that is currently loaded in the ie window?


Who is Participating?
Daniellus83Connect With a Mentor Commented:
hello Netslt,..

I made you an easy one:

Download it.. and you'll see I deleted the RegisterLib things.. and added in the \bin directories a Register.bat file.

Run this Register.Bat after you did a Build of the dll. One note: look in the \bin\output directory for .txt files. They carry the output of the commands. So you can see if the Registering was a SUCCES....

About the install on other machines:

> make sure they have .Net Framework (v1.1) installed:

> They have also to run the

Note: of course you can combine those 2 register.bat files. Only make sure the BandObject.dll is installed first.

I will now gonna try this with my project on my brother machine. You will recieve a post (later) on the succes or not.


I have been searching ver very long for this (Toolbar in IE programmed in .Net) and found finally this example:

This is really the only thing that seems to be a little in this direction.

As you can see its NOT VB.Net but Never-the-less its a VERY VERY basic and short(!) example. I think that this one should be relatively easy to rebuild in VB.Net

Try it and maybe you like it!


btw.: about the "seeing what URL is currently beeing loaded"-question: I have seen a DLL (Interop.SHDocVw.dll; its included ) that had a function like that in it. And of course a lot more than that (superb!). So if you include that one in your project, you'll be able to see those properties too.

Ah,.... are you still interrested in this toolbar in IE ??
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

netsltAuthor Commented:
Yes, still interested, but I guess I'll not be able to rewrite the suggested code to (unfortunately not yet enough skilled to make it within reasonable time)

There are some vb6 classes around (eg complete code on ), I was hoping someone had migrated them to - ???


I was asking cause I started rewriting the code into (about 10 hours of work; last 2 days). I got the code almost errorless, but have some problems to deal with. I have absolutly NO idea how much time that will take. One thing I am really sure about: the question where to find the code (available on the Internet) is worth less EE points than the question to rewrite it ;-)

Maybe I can help you in no time... Can promise nothing ...
netsltAuthor Commented:
OK, I see that you deserve more points for this... hope you make it!
netsltAuthor Commented:
I've also tried to get the code from 6 to .net for several hours, but there were about two errors left - and I don't know what would have happened at runtime... But my VB experience is about 2 weeks (although other languages for years, mainly scripting) so no wonder I don't get it...

No worries,... I do program for years now (started @ 12 years old.. did not got it (a little feeling for it) until I was 16 or so...)

Anyways, I program VB.NET now for 1 year and VB I have done about 2 years before Before that some amateuristic "Borland C" (MS-DOS).

So I cannot say I am a Pro (far from that actually!). But if you are creative enough (am I?) and can hold your breath for a while (is that an english saying?) and now how to seriously Google some up... then you can hack your way into it. Just keep goin'.. just keep goin'.

I can alway try to convert the VB6 code... only if I hadn't spend so much time already in this idea (...). Maybe if I am totally creazy I would try that too. (yes I AM freaking NUTS!)

For now, I am going to sleep.. tomorrow is a new day and I will give it another try. I should be close but I bumped into some serious sh*t since "...VB.Net doesn't fully supports so-called 'Implements' as C#.Net does....". Tomorrow will be a Google-day...

okay... I think I did it...

I will need some more time to check and write a explanation. I will post it on my website. I just managed to rewrite the C# code that manages the communication between the explorer and the (to be written) toolbar-component.

Need to do some more testing,... I also need to find you some more about the way you get info from IE like address and browsing  commando's.

I will keep you up-to-date!
netsltAuthor Commented:
Okay... ready!...

It was a pain in the ass to write it... but hey... someone had to do this ;-)

Here you have the code:

Unfortunatly also this code might contain some (little) errors (in specific cases). I've eliminated already some things but let me know, I will try to handle it. I also will put this code on my website. But I though to give it right away to you since you have been waiting for it now for 5 (?) days (sorry; couldn't do it faster...)

I will try to explain as good as possible:

1) download the file and unzip
2) open first the 'Octopus' dir with the BandObject solution.
3) MAKE SURE (!) all the references are right,
4) Do a 'Build solution'

Now is the BandObject -sort of negotiator between your next app and IE- installed in the Assembly registry.

5) open the Samplebar solution
6) Check the references! You should hook in the BandObject.dll (or so) correctly.
7) do also a build solution
8) now open Internet Explorer,
9) right-click on the grey area next to you addressbar and buttons to see if you "HelloWordBar" is select-able in the pop-up-menu
10) select and make sure a bar with button AND textbox is visible.


the bar (if correctly installed/openend) should show you a msgbox every time you navigate to another site (as you asked),.. and you should be able to type e.g. in the textbox and -when button is clicked- the IE window should navigate to the address typed in the textbox!

Extra notes:

> Both solutions have 2 projects, one of them is always a "RegisterLib" project. This is a clever solution to automatically install the assembly into the registry and MMC. Since this install has to be done last (after a build of the main program), the build order has to be correct (I ve done that already for you).

> Once the BandObject is Build, you won't need to recompile this again, only if this code is changed.

> The "explorer" variable lets you set/get all (...) the propertys of the open IE window. So you can get the current URL (Explorer.LocationURL) or set an URL: Explorer.Navigate("www.yourfavwebsite.domain")

> you can easily handle IE window events :

        Sub DownloadBegin(ByVal URL As String) Handles Explorer.NavigateComplete
        End Sub

Check for this the code behind the msgbox-window with the current URL.  

I hope this will help you,...

netsltAuthor Commented:
Thanks for this.

When opening the octopus project I get an error:
[Error creating assembly manifest: Error reading Keyfile 'K:\MijnDocs\Visual Studio Projects.......\c#\SampleBars\samplebar.snk

(Also I have only VB.NET standard, so any C stuff will not work here.)

I hope you can fix it!


Before you can register your ddl into the MMC, you have to give it a strong name. This is to make sure it's your app (handy for companys) like a unique code. This you can make (quite complicated by hand) but finally there is a file make.

The should be a .snk file in the octopus dir: "BandObjectKey.snk"

If you change in the Assembly.vb:

<Assembly: AssemblyKeyFile("K:\MijnDocs\Visual Studio Projects\testen\IE browser component\C#\SampleBars-c\samplebar.snk")>


<Assembly: AssemblyKeyFile("...\\\\yourlocation\\\\BandObjectKey.snk")>

>>>> So it has NOTHING to do with C#. This was only a directory thing...


BUT A BETTER way to do this, is downloading the tool I use (super handy!!) from (FREE!!) called "Octopus". When installed, you can right-click on the Assembly.vb file (in solution-explorer) an choose "Digitally sign". That should also do the trick.

Then you have for future use this handy tool installed!
netsltAuthor Commented:
I'll check it as soon as I have the time.

Regarding Octopus: I did not find any free download on - where is it exactly?
I am really sorry, I got a little mixed up:

the App is Deadbolt.Net :   (left icon; no registration needed)

(the other webpage is the webservice I used to convert a part of the source-code from csharp to vbnet)

...And,.. did it work out?
netsltAuthor Commented:
I was able to sign it with the tool you recommendet.

But when opening the BandObject Project I get the following error:

The application for Project "...netslt\Octopus\RegisterLIb\RegisterLib.vcproj" is not installed.

Please make sure that the Application for the Project Type (.vcproj) is installed.

I've not tried to install everything yet (some projects have to get finished this week...), but I wonder how you can combine the process - ie having an application that installs itself into IE with one click (Instead of having two projects)?

sorry for the fuzzy things.. Its not very simple...

I will explain it first:

The file: RegisterLib.vcproj is a project file without any .vb foms of code files...
So you have this solution (BandObject) with 2 project: The original project + this RegisterLib.
The only thing this project is ment for is the automatic install of the build BandObject.dll in the first project of the solution BandObject. So the RegisterLib is the finishing touch you can say.

Now solving the problem:

You can do 2 things... (1) get the registerlib to work. But I remembered you'd no C# installed. Don't worry! This is a C++ project. So you should be able to use it!! (2) The other way is, doing by hand what this Utility does..

(ad1) Try this go get it work:

 - Delete the RegisterLib from you project (Right-Click on RegisterLib in the Solution Explorer and choose Remove)
 - Add this Project again: (rightclick in Solutionexplorer on the topmost item and choose Add>Existing Project.. browse to the file RegisterLib.vcproj and add)

(ad2) Do it by hand:

 - Open the " Visual Studio .Net 2003 Command Prompt ".  (you can find it in the Start-menu>YourVSnet2003Map>Visual Studio .NET Tools)

 - Go to the directory where the Build BandObject.dll is. (So do first a "Build BandObject...")
 - Type this into the prompt:

       gacutil /if BandObject.dll
       gacutil /if Interop.SHDocVw.dll

- Then the .dlls are being added to the Assembly Cache ("...Assembly successfully added to the cache...") and you are able to Build the SampleBar.


To avoid same problems with the Sample-bar project (has also a RegistLib):

It works the same (opening the VS.Net2003 Command Prompt), but now you type this:

       gacutil /if SampleBar_VB.NET.dll
       regasm SampleBar_VB.NET.dll


Anyway: it easier for you (and anyone) to install the RegistLib utility.

How to do this automatic? Okay.. I am now going to isolate the utilitys to get this thing to work on its self... need some time.
netsltAuthor Commented:
Thanks, I'll try.

For the software: VB.NET Standard includes only Visual Basic, no C# and no C++ etc.

For the installation: I just wonder why it is not possible to add the whole thing that registers the ie button as a Class to the project that should be called from the button - I've seen they have it done it in VB 6 - its simply a class that adds the correct entries to the registry. Why do we need a separate dll here that has to be registered before etc? (Sorry for asking again, I just want to understand what's going on).

By the way one of my daughters is also playing the cello. She is 10 now and started playing when she was 5. I like the intstrument a lot!
Haha.. nice! Always makes me happy to hear that people play the cello. I started a lot older (about 10; play now 11 years till now..that makes me... ;-) ). I love to do it. Esspecially playing together with Piano (is a must!).

The answers: You are right about the reg.keys and VB6.... They are ALSO include in the BandObject Solution; take a look at the BandObject.vb sourcecode; at the bottom are 9un)register functions.

But now you are working with .Net Dlls (with COM interface/communication..etc) and they need to be registered in the .Net Assembly! And thats what these tools are doing!

I don't really know if these things can be done with a routine from within the application... I really don't know. The original C# project is done by somebody whois is smart enough to figure out, but has'nt done it like you say.

Although: he has made the RegisterLib VC-project!... But that doens't work on you Configuration and it also gives trouble installing on other machines....

But if you wanna distribute your Samplebar:

Make an installer (add a "Setup and deployment project" to your solution) that holds all the dll with the tools and Register.bat file,... (and the .Net Framework?!) and let it all install properly...

{{I must say: I have never made such an installer... but it should be do-able... I might gonna make one myself soon ;-) }}

About the seperate dll's: You should be able to combine those things... (I should try) but it makes it so complicated... And you can re-use the BandObject.dll for other Bars again without the need to include the code again and again...

I hope I explained (...) enough.. feeeeeeeeeeel freeeee to ask more ;-)

And... did you have succes?
netsltAuthor Commented:
Not yet, still very busy with other things - I guess it will take untill next week that I can have a look at it again.
Okay, but don't forget the solution might get flushed after some time...
netsltAuthor Commented:
I know, I'll see that that will not happen!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.