Form transparency

G

Guest

I have a background image for my form that has an alpha channel (PNG or GIF).
I would like my form to become semi-transparent and partially show the
desktop. I can figure out how to set the form's transparency key to a color
and have that color become totally transparent, but I was hoping that the
background image would then be shown semi-transparent. Unfortunately, the
alpha portion of the background image only shows the background color of the
form (which I am using for the transparency key). Is there a way to get full
255 values of alpha for the form's background? Am I limited to a single
"color key"? As a side note, one reason I don't want to use the single color
key is that the fully transparent background no longer belongs to the form
and as such mouse events, etc get passed to what is below. Any suggestions
or insights? Thanks.

Art
 
G

Guest

Patrik,

Thanks for the response, but setting the opacity doesn't solve my problem.

Opacity makes everything have the same alpha value (even menu items &
buttons I believe). What I need is something that will allow the FULL range
of 0-255 alpha values. I am beginning to believe that this is not supported.


Patrik Löwendahl said:
There's an opacity proeprty of the form, set it to 50%.

--
Patrik Löwendahl [C# MVP]
www.cshrp.net - "Elegant code by witty programmers"

mattaku said:
I have a background image for my form that has an alpha channel (PNG or GIF).
I would like my form to become semi-transparent and partially show the
desktop. I can figure out how to set the form's transparency key to a color
and have that color become totally transparent, but I was hoping that the
background image would then be shown semi-transparent. Unfortunately, the
alpha portion of the background image only shows the background color of the
form (which I am using for the transparency key). Is there a way to get full
255 values of alpha for the form's background? Am I limited to a single
"color key"? As a side note, one reason I don't want to use the single color
key is that the fully transparent background no longer belongs to the form
and as such mouse events, etc get passed to what is below. Any suggestions
or insights? Thanks.

Art
 

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

Similar Threads


Top