icon in outlook addin commandbar..

J

Joe

hi

i am facing a serious problem with my icons in my Outlook Shared-Addin
which i created using Visual Studio 2005 [c#] . i not able to use files
of *.ico format for the purpose. The one's which are acceptable in the
methods which i came accross take only *.bmp .

i ve used 2 of the following methods both give the same output..
Method 1.

Bitmap bmp;
bmp = (Bitmap)rm.GetObject("calendarIcon");
System.Drawing.Color colorTransparent = bmp.GetPixel(0,
0);
for (int x = bmp.Width - 1; x >= 0; x--)
for (int y = bmp.Height - 1; y >= 0; y--)
if (bmp.GetPixel(x, y) == colorTransparent)
bmp.SetPixel(x, y,
System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.Control));

Clipboard.SetDataObject(bmp);
ipolipoButton.FaceId = 0;
ipolipoButton.PasteFace();
Method 2.
iPolipoCalendar frmCalendar = new iPolipoCalendar();
ipolipoButton.Picture =
(IPictureDisp)AxHost2.GetIPictureDispFromPicture(frmCalendar.iconList.Images[0]);
~~~~~~~~
public class AxHost2 : AxHost
{
public AxHost2()
: base("59EE46BA-677D-4d20-BF10-8D8067CB8B33")
{
}
public new static IPictureDisp GetIPictureDispFromPicture(Image
image)
{
return
(IPictureDisp)AxHost.GetIPictureDispFromPicture(image);
}
}
~~~~~~~~~~~~~~
both these methods fail to give a trasparent effect to the icons in my
commadbar..
method 1 . works fine for outlook xp as its backcolor is Color.Control.
but the same displays a shadow when it comes to Outlook 2003.

then again.. in the Method 2 *.ico files are not accepted.. only Image
is the acceptable type..

How do i do this .. i ve seen addin with perfect icons like
"GotoMeeting" etc.

could some of the Outlook experts help me out.. is there anyother way
to get it done..

thanks in advance.
 
B

Brian Tillman

Joe said:
i am facing a serious problem with my icons in my Outlook Shared-Addin
which i created using Visual Studio 2005 [c#] . i not able to use
files of *.ico format for the purpose. The one's which are acceptable
in the methods which i came accross take only *.bmp .

i ve used 2 of the following methods both give the same output..
Method 1.

Programming questions go in the programming newsgroups.
news://msnews.microsoft.com/microsoft.public.outlook.program_addins
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top