469,917 Members | 1,473 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,917 developers. It's quick & easy.

Form transparency

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

Jul 21 '05 #1
2 1481
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" <ma*****@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
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

Jul 21 '05 #2
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 [C# MVP]" wrote:
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" <ma*****@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
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


Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

20 posts views Thread by Nathan Sokalski | last post: by
5 posts views Thread by Matthew | last post: by
2 posts views Thread by mattaku | last post: by
4 posts views Thread by Simon Tamman {Uchiha Jax} | last post: by
11 posts views Thread by Ajith Menon | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.