views:

212

answers:

0

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