我使用下面的类从我的C#代码中为Excel2003中的自定义工具栏生成图标:
public class ImageConverter : System.Windows.Forms.AxHost
{
public ImageConverter() : base("59EE46BA-677D-4d20-BF10-8D8067CB8B33")
{
}
public static stdole.IPictureDisp ImageToIpicture(System.Drawing.Image image)
{
return (stdole.IPictureDisp)ImageConverter.GetIPictureDispFromPicture(image);
}
}我的问题是如何制作透明的图标?我所有的图标都是透明的gif,但在Excel2003中,它们的背景是纯蓝色的。
发布于 2009-04-04 13:14:37
您需要创建一个蒙版图像,并将其分配给commandbarbutton.mask。有关详细信息,请参阅http://support.microsoft.com/kb/286460/
https://stackoverflow.com/questions/532043
复制相似问题