Y
Yael
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.GetIPictureDispFromPicture(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(imgStreamPic));
this.toolbarBtnWeb.Picture = Pic;
Why it's not working on every computer???
Thank's,
Yael
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.GetIPictureDispFromPicture(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(imgStreamPic));
this.toolbarBtnWeb.Picture = Pic;
Why it's not working on every computer???
Thank's,
Yael