Custom Control - Toolbox bitmap?

D

David Veeneman

I'm using a ToolboxBitmap attribute to specify a toolbox bitmap for a custom
component I've written. The component appears in the WindowsForms tray area,
below the form in which it is dropped. I'm using magenta as my transparency
color, and the lower-left corner pixel is magenta.

The bitmap works fine in the toolbox, but when I drop the component on a
form, the bitmap in the tray area lacks transparence--in other words, the
magenta background shows. Can anyone shed light on how to fix this? Thanks

David Veeneman
FS Components
 
D

David Veeneman

Found my answer--In VS 2005, the toolbox bitmap doesn't have to be a
16-color bmp, as it did in previous versions. I created my toolbox bitmap as
a 16 x 16 .png file, and it works fine, in the toolbox, and in the tray.
 
D

David Veeneman

I found the answer--VS 2005 doesn't require that the toolbox bitmap be a
bmp, so it doesn't set a transparent color. I changed the t.b. to a png file
with transparency, and it works fine.
 

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