Here is our code:
Bitmap
bmp = new Bitmap(typeof(MyClassName), "Resources.mybitmap");uint clrTransparent = (uint)Color.Fuchsia.ToArgb(); // Declare toolbox item structure
TBXITEMINFO[] tbxInfo;
tbxInfo = new TBXITEMINFO[1];
tbxInfo[0].bstrText = "mytoolboxitem";
tbxInfo[0].hBmp = bmp.GetHbitmap();
tbxInfo[0].clrTransparent = clrTransparent ;
int result = svc.AddItem(dataObject, tbxInfo, BlackberryConstants.TabName);
The toolbox item adds just fine and our image does show up in the toolbox but the Fuchsia color that is in the bitmap is not converted to transparent.
We have tried doing a "SetTransparentColor" on the bitmap before passing it to the TBXITEMINFO but that causes even more wierd painting to occur
Anyone have some ideas on what may have been changed

Toolbox Images no longer showing up transparent
JayKay
Bitmap bmp = new Bitmap(typeof(MdsFormEditorToolbox), "Resources." + resource);
uint clrTransparent = (uint)System.Drawing.ColorTranslator.ToWin32(Color.Fuchsia);
// Declare toolbox item structure
TBXITEMINFO[] tbxInfo;
tbxInfo = new TBXITEMINFO[1];
tbxInfo[0].bstrText = name;
tbxInfo[0].hBmp = System.Windows.Forms.ControlPaint.CreateHBitmap16Bit(bmp, Color.Fuchsia);
tbxInfo[0].clrTransparent = clrTransparent ;
int result = svc.AddItem(dataObject, tbxInfo, BlackberryConstants.TabName);
Henk van Andel
-Josh
VS Platform team
BarBQ
I tried your suggestion and changed the line to:
tbxInfo[0].hBmp = System.Windows.Forms.
ControlPaint.CreateHBitmap16Bit(bmp, Color.Fuchsia);instead of:
tbxInfo[0].hBmp = bmp.GetHbitmap();
The result of this was that the Black areas of the bitmap became transparent and the Fuchsia stayed Fuchsia.
I've been thinking along the same lines though, that it may have something to do with the color pallet...
Vaibhav_Patel
-Josh
VS Platform team