PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins vs.net installed and add-in problem

Reply

vs.net installed and add-in problem

 
Thread Tools Rate Thread
Old 03-06-2007, 01:17 PM   #1
=?Utf-8?B?WWFlbA==?=
Guest
 
Posts: n/a
Default vs.net installed and add-in problem


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.

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off