Y
Yael
My problem is that I don't see my icon bmp in a butoon add-in :
In my work computer this code working good and I see the add-in button in
outlook,
I was created new project (same code but guid else), in my home computer and
I can't see the icon..
this.toolbarBtn2.Style = MsoButtonStyle.msoButtonIconAndCaption;
// set pic to this button2
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.toolbarBtn2.Picture = Pic;
using System;
using System.Drawing;
using System.Windows.Forms;
using stdole;
namespace MatarotToolbar
{
/// <summary>
/// Summary description for MatarotHost.
/// </summary>
public class MatarotHost : AxHost
{
public MatarotHost() : base( "3E9806D0-18A4-47EA-98A0-69C71BEC2AD9"){ }
public static stdole.IPictureDisp IPictureDisp(System.Drawing.Image Image)
{
return ((stdole.IPictureDisp)(AxHost.GetIPictureDispFromPicture(Image)));
}
}
}
In my work computer this code working good and I see the add-in button in
outlook,
I was created new project (same code but guid else), in my home computer and
I can't see the icon..
this.toolbarBtn2.Style = MsoButtonStyle.msoButtonIconAndCaption;
// set pic to this button2
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.toolbarBtn2.Picture = Pic;
using System;
using System.Drawing;
using System.Windows.Forms;
using stdole;
namespace MatarotToolbar
{
/// <summary>
/// Summary description for MatarotHost.
/// </summary>
public class MatarotHost : AxHost
{
public MatarotHost() : base( "3E9806D0-18A4-47EA-98A0-69C71BEC2AD9"){ }
public static stdole.IPictureDisp IPictureDisp(System.Drawing.Image Image)
{
return ((stdole.IPictureDisp)(AxHost.GetIPictureDispFromPicture(Image)));
}
}
}