vs.net installed and add-in problem

Y

Yael

Hi,
I created a com add-in for outlook 2003 in vs.net 2003 c#.
Only if I had an Icon to the button of the outlook commandBtnBar I have
this problem: (if I don't had this class for the button, I don't have this
problem at all).
What is strange: If I have vs.net installed in a computer, everything
running OK!
If I don't have vs.net instaled, I get this problem.
The problem:******************************
I don't get errors, but I can't see the button add-in!
But the code of the add-in not arrive to this part of the code
OnStartupComplete()
MessageBox.Show("OnStartupComplete()");
If I remove AxHost.GetIPictureDispFromPicture(image), I don;t have the
problem and I can see my add-in button (without icon).
****************************************

public class MatarotHost : AxHost
{
public MatarotHost() : base("02FD5840-C1A3-448E-8310-98611DF58281"){ }
public static IPictureDisp GetIPictureDispFromPicture ( Image image )
{ return AxHost.GetIPictureDispFromPicture(image) as IPictureDisp; }
}

I'm calling this method like:
this.toolbarBtn.Style = MsoButtonStyle.msoButtonIconAndCaption;
string ns = this.GetType().Namespace;
Assembly CurrentAssembly = this.GetType().Assembly;
System.IO.Stream imgStreamPic =
CurrentAssembly.GetManifestResourceStream(ns+"." + "matarotqm.bmp");
stdole.IPictureDisp Pic =
MatarotHost.GetIPictureDispFromPicture(Image.FromStream(imgStreamPic));
this.toolbarBtnWeb.Picture = Pic;

Thanking you in anticipation.
Yael.
 

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