Thread: About AxHost
View Single Post
  #4  
Old May 31st 07, 03:21 PM posted to microsoft.public.outlook.program_addins
Yael
external usenet poster
 
Posts: 23
Default About AxHost

Hi,
I funded the problem:
Add-in runing only on computer having a VS.NET
If the Visual Studio is not installed I don't get my com add-in because of
public class MatarotHost : AxHost
Why?
Or if I don't add this class, It's running good.
Thank's,
Yael.

public class MatarotHost : AxHost
{
public MatarotHost() : base( "02FD5840-C1A3-448E-8310-98611DF58281"){ }
public static stdole.IPictureDisp IPictureDisp(System.Drawing.Image Image)
{
return ((stdole.IPictureDisp)(AxHost.GetIPictureDispFromP icture(Image)));
}

"Dmitry Streblechenko" wrote:

Does not work as in "an exception is raised"? Or as in "no errors, but
nothing happens"?
Is it running on Outlook 2003 or higher? Outlook 2002 or below do not expose
the CommandBarBurton.Picture property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Yael" wrote in message
...
Hi,
I have a problem, this code don't work in every computer:
I'm using this for display a bitmap in the add-in button:

public class MatarotHost : AxHost
{
public MatarotHost() : base( "02FD5840-C1A3-448E-8310-98611DF58281"){ }
public static stdole.IPictureDisp IPictureDisp(System.Drawing.Image Image)
{
return ((stdole.IPictureDisp)(AxHost.GetIPictureDispFromP icture(Image)));
}


this.toolbarBtn.Style = MsoButtonStyle.msoButtonIconAndCaption;
// set pic to this toolbarBtn
string ns = this.GetType().Namespace;
Assembly CurrentAssembly = this.GetType().Assembly;
System.IO.Stream imgStreamPic =
CurrentAssembly.GetManifestResourceStream(ns+"." + "matarotqm.bmp");
stdole.IPictureDisp Pic =
MatarotHost.IPictureDisp(Image.FromStream(imgStrea mPic));
this.toolbarBtnWeb.Picture = Pic;

Why it's not working on every computer???
Thank's,
Yael




Ads