Custom IE Toolbar with C#?

J

Jason Tabert

Is there a way to create a custom IE toolbar with C# (or anything else in
..NET for that matter)?

I have been looking all day and have had no luck finding a good place to
start. I need to make a toolbar for a research project that does some
things with existing code that we've written. We need to get working on
making the toolbar *do things* but I can't even get started with making a
basic toolbar.

Any suggestions would be much appreciated. I've read about 10 different
ways of doing things but none of them have either worked or been much help,
and MSDN is confusing me more each time instead of helping...It seems like I
should be able to fire up VS.NET 2003 and click on something simple and get
to work but I certainly haven't found how to do that.

Thanks in advance!

~Jason


--
'***************************************
'* Jason R. Tabert
'* Student, University of Washington, Informatics
'*
'* (e-mail address removed)
'* http://www.placelab.org/
'***************************************
 
T

Trebek

Jason,

Yes, it is possible but it does require a bit of work. I have written a C#
toolbar (a 'managed' .NET upgrade of my existing ATL toolbar from a few
years ago). Some of things you need to look into are :

1) Writing a base class that derives from System.Windows.Forms.UserControl
and implementing the follwoing interfaces...
- IObjectWithSite
- IDeskBand
- IDockingWindow
- IOleWindow
- IInputObject


2) Handling type conversion from unmanaged to managed types. This can be
tricky cause of disparate differences between the two.

3) You will need to strong name your derived class for gac registration.
This class must reside in the gac.

4) Using regasm to register the types necessary

Unfortunately there is no 'easy' way thru VS to simply do these things for
you, but, for what it's worth, once you have generated this 'base' class
that implements the required COM interfaces, you shouldn't need to ever deal
with it again.

HTH,

Alex
 
J

Jason Tabert

Great I'll try this stuff out. Thanks for the help!

~Jason

Nicholas Paldino said:
Trebek and Jason,

Most of this has been done already. Check out the article on The Code
Project website titled "Extending Explorer with Band Objects using .NET and
Windows Forms", located at (watch for line wrap):

http://www.codeproject.com/csharp/dotnetbandobjects.asp

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Trebek said:
Jason,

Yes, it is possible but it does require a bit of work. I have written a C#
toolbar (a 'managed' .NET upgrade of my existing ATL toolbar from a few
years ago). Some of things you need to look into are :

1) Writing a base class that derives from System.Windows.Forms.UserControl
and implementing the follwoing interfaces...
- IObjectWithSite
- IDeskBand
- IDockingWindow
- IOleWindow
- IInputObject


2) Handling type conversion from unmanaged to managed types. This can be
tricky cause of disparate differences between the two.

3) You will need to strong name your derived class for gac registration.
This class must reside in the gac.

4) Using regasm to register the types necessary

Unfortunately there is no 'easy' way thru VS to simply do these things for
you, but, for what it's worth, once you have generated this 'base' class
that implements the required COM interfaces, you shouldn't need to ever deal
with it again.

HTH,

Alex
making
a like and
get
 
T

Taylor Monacelli

What about using Band Objects?
http://www.codeproject.com/csharp/dotnetbandobjects.asp


I followed the sample HelloWorldBar and that made it quite simple to do what
I wanted.

I used Pavel Zolnikov's Band Object assembly to create a little toolbar
similar to the google toolbar. My toolbar's purpose was pretty simple: when
I click on the toolbar, the current web page is searched for all the href
links and I then store those links to a file. I read the html using
microsoft.mshtml assembly.

Taylor
 
A

Adnan

I placed a textbox on toolbar but i am unable to use BackSpace key in
it
somebody told me to implement IInputObject Interface,

can anyone tell me how can I do it and then use to enable backspace for
the toolbar?

Thanks
-adnan

Trebek and Jason,

Most of this has been done already. Check out the article on The Code
Project website titled "Extending Explorer with Band Objects using ..NET and
Windows Forms", located at (watch for line wrap):

http://www.codeproject.com/csharp/dotnetbandobjects.asp

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Trebek said:
Jason,

Yes, it is possible but it does require a bit of work. I have
written a
C#
toolbar (a 'managed' .NET upgrade of my existing ATL toolbar from a few
years ago). Some of things you need to look into are :

1) Writing a base class that derives from System.Windows.Forms.UserControl
and implementing the follwoing interfaces...
- IObjectWithSite
- IDeskBand
- IDockingWindow
- IOleWindow
- IInputObject


2) Handling type conversion from unmanaged to managed types.
This can
be
tricky cause of disparate differences between the two.

3) You will need to strong name your derived class for gac registration.
This class must reside in the gac.

4) Using regasm to register the types necessary

Unfortunately there is no 'easy' way thru VS to simply do these things for
you, but, for what it's worth, once you have generated this 'base' class
that implements the required COM interfaces, you shouldn't need to
ever
deal
with it again.

HTH,

Alex
else
making
a much
help,
seems
like simple and
get
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top