PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
help with windows transparency
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
help with windows transparency
![]() |
help with windows transparency |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
i forgot to mention. the transparent color at 0,0 is bright yellow, so thats
not why the black is transparent too. "jt harkey" wrote: > 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. > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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. "jt harkey" wrote: > 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. > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Have you seen this bug report? It looks like it's related:
http://lab.msdn.microsoft.com/produ...9f-b246dabaeef0 The bad news is that this bug was reported in July, and MS has responded that they know it's a real bug, but they don't consider it an important enough bug to fix at this time. And that was 5 months ago... [==P==] "jt harkey" <jtharkey@discussions.microsoft.com> wrote in message news 9191143-8473-4D42-B13E-695D61A4CD20@microsoft.com...> 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. > > "jt harkey" wrote: > >> 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. >> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

9191143-8473-4D42-B13E-695D61A4CD20@microsoft.com...
