Re: MsoButtonStyle.msoButtonIconAndCaption

Tech-Archive recommends: Fix windows errors by optimizing your registry



Can you step the code or write error logging to see what's failing on the target computer? It's hard to say why it's working on one computer and not the other from this information. Is the image where it should be on the target system?

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Yael" <Yael@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:CF54764D-074E-4F1F-85E5-3548021BAAF6@xxxxxxxxxxxxxxxx
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)));
}
}

}


.


Quantcast