Semi-transparent PNG Image on transparent Form

Posted by Marco Bruggmann on Stack Overflow See other posts from Stack Overflow or by Marco Bruggmann
Published on 2010-04-09T05:00:14Z Indexed on 2010/04/09 5:03 UTC
Read the original article Hit count: 482

Filed under:
|
|
|
|

Hello, I have a problem dealing with transparent images on transparent Forms. I have been trying and looking for a solution but nothing useful came up.

The problem is:

I have a Form, this Form has a Panel and the Panel has a PictureBox. Form and Panel are transparent. Now, if the image of the PictureBox has no semi-transparent it works. But if there is a gradient transparency then the "transparent color" is shown. I need the Panel and the PictureBox, so the PerPixelAlpha does not apply for this case. The Form will also have more Controls that should be visible and non transparent (just the PNG image should be transparent).

The image below shows:

[Left] When the Panel is not transparent.
[Center] When the Panel is transparent.
[Right] Desired effect (done with PerPixelAlpha).

http://www.freeimagehosting.net/uploads/3937fe974d.jpg

THX

Marco

© Stack Overflow or respective owner

Related posts about image

Related posts about transparency