I have a form that i set it\'s Opacity as 50% like this:
this.Opacity = 0.5D; <--this==Form
My problem is that everything that on the fo
Since Control
doesn't have Opacity
property and plus that, most of the controls doesn't support transparent colors, then a working solution can be this:
Create a Form
called MainForm
and place all the controls you're going to be excluded.
1.1 Set both of BackColor
and TransparencyKey
properties of MainForm
to the same color, e.g Color.Red
Create another form named TransparentForm
and place all controls that must become transparent. Set ShowInTaskbar
property to False
.
In the MainForm
Load
event show the TransparentForm
and send it to back.
private void MainForm_Load(object sender, EventArgs e)
{
TransparentForm form = new TransparentForm();
form.Opacity = 0.5D;
form.Show();
form.SendToBack();
}
The position of controls in both form must be such that, when combined, it shows the proper user interface.