Custom IE Toolbar IE6 C#

E

EmeraldShield

I am developing a toolbar for IE6. I have referenced the sample project
provided at http://www.codeproject.com/csharp/dotnetbandobjects.asp and the
msdn article "Creating Custom Explorer Bars, Tool Bands, and Desk Bands". I
have followed the instructions and installed the samplebar.dll and the
bandobjectslib.dll into the GAC using gacutil as well as performed a regasm
on the samplebar.dll. After doing these things I do see the menu items under
View->Toolbars and under all the other locations. My problem is that after
clicking the toolbar one and the deskband nothing happens. When clicking the
one under "explorer bar" I get a blank horizontal band at the bottom. These
bands should include a button according to the sample and from what I can
determine from the code. I have reviewed posts on codeproject and see that
one other person has experienced this issue but has yet to receive a
response. I have confirmed that the registry entries match what is expected
also. Any help such as debugging tips for these types of applications would
be most helpful. Below is my system and compiler info.

Windows XP Pro SP2
Internet Explorer 6 SP2
Visual Studio 2005 Standard
 
N

Nicholas Paldino [.NET/C# MVP]

EmeraldShield,

I would opt to not place the assembly in the GAC (for debugging) and
when registering using REGASM use the /codebase option.

Then, you can run your project in the debugger, and then run IE, and you
should be able to debug it.

Hope this helps.
 
E

EmeraldShield

Ok, I can now debug the app. My situation now is that after setting the
basic information (minsize, title, etc.) Explorer is disposing me via
CloseDW. I am never seeing any other functions on the interface nor the
OnExplorerAttached event get called. Is there a sample solution that
Microsoft provides for IE Toolbar development under .NET?

Nicholas Paldino said:
EmeraldShield,

I would opt to not place the assembly in the GAC (for debugging) and
when registering using REGASM use the /codebase option.

Then, you can run your project in the debugger, and then run IE, and
you should be able to debug it.

Hope this helps.


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

EmeraldShield said:
I am developing a toolbar for IE6. I have referenced the sample project
provided at http://www.codeproject.com/csharp/dotnetbandobjects.asp and
the msdn article "Creating Custom Explorer Bars, Tool Bands, and Desk
Bands". I have followed the instructions and installed the samplebar.dll
and the bandobjectslib.dll into the GAC using gacutil as well as performed
a regasm on the samplebar.dll. After doing these things I do see the menu
items under View->Toolbars and under all the other locations. My problem
is that after clicking the toolbar one and the deskband nothing happens.
When clicking the one under "explorer bar" I get a blank horizontal band
at the bottom. These bands should include a button according to the sample
and from what I can determine from the code. I have reviewed posts on
codeproject and see that one other person has experienced this issue but
has yet to receive a response. I have confirmed that the registry entries
match what is expected also. Any help such as debugging tips for these
types of applications would be most helpful. Below is my system and
compiler info.

Windows XP Pro SP2
Internet Explorer 6 SP2
Visual Studio 2005 Standard
 
G

Gary Chang[MSFT]

Hi EmeraldShield,

Thank you posting!

Based on my understanding, the problem is you developed a C# toolbar
plug-in for IE6 based on a popular codeproject sample. But your plug-in
could not seeing any other functions on the interface nor the
OnExplorerAttached event get called. Please correct me if I misunderstood.

Since the IE6 toolbar plug-in is a shell programming issue, and it would be
more convenient to develop with a native program. So currently we don't
have a sample solution for IE Toolbar development under .NET. The Pavel
Zolnikov's sample is an excellent sample on such a field.

In order to isolate this problem, would you please provide more detailed
info about your program, how do you implement the plug-in, does your
approach have much difference from Pavel's sample?


Thanks !

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
E

EmeraldShield

You understand correctly. The issue I am encountering is with that sample
project with NO modifications other than what Visual Studio has done to it
during the conversion to 2005. From what I have read on the codeproject site
one other person had the exact same issue but no reply ever came to his
post. So I am at a lost at where to begin to develop my own version since
the sample does not work for me. I have tried the coversion, compile and
execution on 2 machines with the same result. Any thoughts?
 
G

Gary Chang[MSFT]

Hi EmeraldShield,
The issue I am encountering is with that sample
project with NO modifications other than what
Visual Studio has done to it during the conversion
to 2005.

OK, I got it. You convert that VS2002 sample to VS2005, but it will not
prompt the messagebox when you click the "Say Hello" button in its say
hello toolbar.

I also download that sample and convert it into VS2005, it works well on my
side. I just modify that upgraded projects' signing approach, its original
signing method seems not work in VS2005. I comment out the following code
lines in BandObjectLib project and SampleBars project respectively:

Line 16 of BandObject.cs in BandObjectLib project
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Line 57 of assemblyinfo.cs in SampleBars project's
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Then singing both projects' assemblies via the VS2005 IDE:
Project Properties | Signing | Check the "Sign the assembly" option and
select the BandObjects.snk in the 'Choose a strong name key file:' entry
(use the <browse> option to locate that sample key file).

Wish this also works on your side!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
E

EmeraldShield

Correct, except that I do not even see the button. I can only see the menu's
which are setup by the registry. I did comment the lines you mentioned and
used the IDE to sign. When debugging it manages to setup the objects title
and such after being called from the explorer menu. But instead of
displaying the button on the toolbar dispose fires and nothing else happens.
Any ideas what may be setup incorrectly to cause this?

"Gary Chang[MSFT]" said:
Hi EmeraldShield,
The issue I am encountering is with that sample
project with NO modifications other than what
Visual Studio has done to it during the conversion
to 2005.

OK, I got it. You convert that VS2002 sample to VS2005, but it will not
prompt the messagebox when you click the "Say Hello" button in its say
hello toolbar.

I also download that sample and convert it into VS2005, it works well on
my
side. I just modify that upgraded projects' signing approach, its original
signing method seems not work in VS2005. I comment out the following code
lines in BandObjectLib project and SampleBars project respectively:

Line 16 of BandObject.cs in BandObjectLib project
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Line 57 of assemblyinfo.cs in SampleBars project's
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Then singing both projects' assemblies via the VS2005 IDE:
Project Properties | Signing | Check the "Sign the assembly" option and
select the BandObjects.snk in the 'Choose a strong name key file:' entry
(use the <browse> option to locate that sample key file).

Wish this also works on your side!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
E

EmeraldShield

Here is an exact step by step list of the actions I am taking.

1. Extract zip to test folder.
2. Comment out Line 16 of BandObject.cs in BandObjectLib project.
3. Sign assembly via the IDE for BandObjectLib project using the provided
snk.
4. Build solution and run gacutil /if on the dll.
5. Comment out line 57 of assemblyinfo.cs in SampleBars project.
6. Sign assembly via the IDE for SampleBars project.
7. Choose correct path for explorer.exe to be used for debugging.
8. Build SampleBars project.
9. Run gacutil /if on the the samplebars.dll.
10. Run regasm /codebase on samplebars.dll.
11. Launch solution via debug mode.

Once I do this I can see the menu's as explained earlier but at no point can
I get the button to display. Dispose always fires right after the
constructor sets the objects fields. I hope I have clarified my actions to
better help you assist me. Thanks.

EmeraldShield said:
Correct, except that I do not even see the button. I can only see the
menu's which are setup by the registry. I did comment the lines you
mentioned and used the IDE to sign. When debugging it manages to setup the
objects title and such after being called from the explorer menu. But
instead of displaying the button on the toolbar dispose fires and nothing
else happens. Any ideas what may be setup incorrectly to cause this?

"Gary Chang[MSFT]" said:
Hi EmeraldShield,
The issue I am encountering is with that sample
project with NO modifications other than what
Visual Studio has done to it during the conversion
to 2005.

OK, I got it. You convert that VS2002 sample to VS2005, but it will not
prompt the messagebox when you click the "Say Hello" button in its say
hello toolbar.

I also download that sample and convert it into VS2005, it works well on
my
side. I just modify that upgraded projects' signing approach, its
original
signing method seems not work in VS2005. I comment out the following code
lines in BandObjectLib project and SampleBars project respectively:

Line 16 of BandObject.cs in BandObjectLib project
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Line 57 of assemblyinfo.cs in SampleBars project's
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Then singing both projects' assemblies via the VS2005 IDE:
Project Properties | Signing | Check the "Sign the assembly" option and
select the BandObjects.snk in the 'Choose a strong name key file:' entry
(use the <browse> option to locate that sample key file).

Wish this also works on your side!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
E

EmeraldShield

Apparently it is either the fact I installed stuff to the gac or something
that is wrong that both of those machines share in common. I have followed
the most simplistic outline and did not install to the gac on one of my
personal machines. Here I only ran regasm and I am finding the solution to
work properly as you mentioned. Thank you for your help. Would you say that
the installation to the GAC caused this issue?
EmeraldShield said:
Here is an exact step by step list of the actions I am taking.

1. Extract zip to test folder.
2. Comment out Line 16 of BandObject.cs in BandObjectLib project.
3. Sign assembly via the IDE for BandObjectLib project using the provided
snk.
4. Build solution and run gacutil /if on the dll.
5. Comment out line 57 of assemblyinfo.cs in SampleBars project.
6. Sign assembly via the IDE for SampleBars project.
7. Choose correct path for explorer.exe to be used for debugging.
8. Build SampleBars project.
9. Run gacutil /if on the the samplebars.dll.
10. Run regasm /codebase on samplebars.dll.
11. Launch solution via debug mode.

Once I do this I can see the menu's as explained earlier but at no point
can I get the button to display. Dispose always fires right after the
constructor sets the objects fields. I hope I have clarified my actions to
better help you assist me. Thanks.

EmeraldShield said:
Correct, except that I do not even see the button. I can only see the
menu's which are setup by the registry. I did comment the lines you
mentioned and used the IDE to sign. When debugging it manages to setup
the objects title and such after being called from the explorer menu. But
instead of displaying the button on the toolbar dispose fires and nothing
else happens. Any ideas what may be setup incorrectly to cause this?

"Gary Chang[MSFT]" said:
Hi EmeraldShield,

The issue I am encountering is with that sample
project with NO modifications other than what
Visual Studio has done to it during the conversion
to 2005.

OK, I got it. You convert that VS2002 sample to VS2005, but it will not
prompt the messagebox when you click the "Say Hello" button in its say
hello toolbar.

I also download that sample and convert it into VS2005, it works well on
my
side. I just modify that upgraded projects' signing approach, its
original
signing method seems not work in VS2005. I comment out the following
code
lines in BandObjectLib project and SampleBars project respectively:

Line 16 of BandObject.cs in BandObjectLib project
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Line 57 of assemblyinfo.cs in SampleBars project's
///[assembly: AssemblyKeyFile(@"..\..\..\BandObjects.snk")]

Then singing both projects' assemblies via the VS2005 IDE:
Project Properties | Signing | Check the "Sign the assembly" option and
select the BandObjects.snk in the 'Choose a strong name key file:' entry
(use the <browse> option to locate that sample key file).

Wish this also works on your side!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
 
G

Gary Chang[MSFT]

Hi EmeraldShield,

Thanks for your detailed steps, it seems OK. But I am not very clear why it
doesn't work on your side. It just runs well on my Windows XP SP2 machine.

I think you may also test my revised sample projects on your machine. Would
you please provide a valid email address to me for sending the projects,
you can contact me directly via my email box. (just remove the "online" of
my email address alias).

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
E

EmeraldShield

The problem is this: vs_piaredist.exe

Why are the primary interop assemblies not included with 2.0 normal setup?
They are on all my development machines, but not on end user machines.

And while I am complaining... Why can't you reference that in the built in
setup builder? There is no merge module for setting them up. Telling my
users they have to install it by hand is not an option.
 
G

Gary Chang[MSFT]

Hi EmeraldShield,

I am afraid that redistribute is not a .NET 2.0 setup project's basic
prerequisite component. But there is a problem the setup project unable to
check out that dependency. I will forward this issue to our corresponding
product team for review.

Thanks for your feedback!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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