C#和#x2B;Excel 2003-透明自定义图标
我使用以下类从我的C#代码生成Excel 2003中自定义工具栏的图标:C#和#x2B;Excel 2003-透明自定义图标,c#,icons,excel-2003,transparent,C#,Icons,Excel 2003,Transparent,我使用以下类从我的C#代码生成Excel 2003中自定义工具栏的图标: 我的问题是如何制作透明图标?“我的所有图标都是透明的GIF,但在Excel 2003中,它们有纯蓝色背景。您需要创建一个遮罩图像并将其指定给commandbarbutton.mask。有关更多详细信息,请参阅 public class ImageConverter : System.Windows.Forms.AxHost { public ImageConverter() : base("59EE46BA-677
我的问题是如何制作透明图标?“我的所有图标都是透明的GIF,但在Excel 2003中,它们有纯蓝色背景。您需要创建一个遮罩图像并将其指定给commandbarbutton.mask。有关更多详细信息,请参阅
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);
}
}