help with windows transparency

G

Guest

hello, i am trying to create a form with the shape of a bitmap, like media
player can do. i know that there is a bug with the TransparencyKey property
and 32bpp mode. so i tried the workaround provided on msdn but it doesnt
work. could someone please tell me what im doing wrong? i am using windows
xp. here is my code.

Bitmap bmp = new Bitmap("Body.bmp");
bmp.MakeTransparent(bmp.GetPixel(0, 0));
BackgroundImage = bmp;
this.TransparencyKey = bmp.GetPixel(0, 0);

now this does make the proper color transparent (which is at 0,0 on the
bitmap), but it also makes pure black (RGB(0,0,0). why would it do this?

thanks in advance.
 
G

Guest

i forgot to mention. the transparent color at 0,0 is bright yellow, so thats
not why the black is transparent too.
 
G

Guest

ugh, i still cant get it. i cant figure this out. does anyone have any idea?
no matter what the pure black is always transparent and it shouldnt be.
 

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