473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1650
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Nathan Sokalski | last post by:
I am trying to create graphics with GDI+ that include transparency. However, the transparency never seems to show up, even though my colors have an alpha value of 0. How can I generate a graphic...
2
by: Alex Gray | last post by:
Hi, I'm trying to make my PictureBox transparent to the BackgroundImage of the Form, not the BackColor of the form. Here's what i have: ---------------------------------------------------...
5
by: Matthew | last post by:
I have Visual Basic .NET 2003, and wanted to create a form that only shows the contents of a label. The form can't have a title bar or border. It seriously needs to just be the text inside the...
17
by: Barret Bonden | last post by:
As an old programmer just now looking at VB.net I have a question: How does one simply open one form from another ? I don't mean how does one create a new instance of that form , but rather how...
1
by: | last post by:
How do I control the layering of 4 forms of identical size and position to cause the desired form to be second from the top.. Form1 has my welcome screen etc.and the code for file manipulations...
2
by: mattaku | last post by:
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...
4
by: Simon Tamman {Uchiha Jax} | last post by:
Scenario: Two System.Windows.Forms: Form1 and Form2. Form1 is displayed, Form2 is hidden. At this juncture, is it possible to take the graphics from Form2 and output that to Form1's display...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
1
by: matthewr | last post by:
I want to create a fully-transparent fullscreen form which records clicks but also passes on the 'click' to the desktop. Specifically, I have an existing application which displays a webpage...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.