Reputation: 1953
I have a Panel on windows Form with few controls inside panel,
Can i make panel completely transparent.
(It should give the feel that controls are placed directly on Form)
Upvotes: 9
Views: 38855
Reputation: 4838
If you go to the BackColor property, and change the Selector to "Web" the first choice is Transparent (at least it is in my VB IDE). I believe that the BackColor of the Panel would inherit the color of the component it is on.
Upvotes: 16
Reputation: 659
I assume it is WinForms app.
Try this in Form.Load event:
private void Form1_Load_1(object sender, EventArgs e)
{
panel1.BackColor = Color.FromArgb(0, 0, 0, 0);
}
where panel1 is the panel you want to have transparent.
It will make the color transparent. You can have other controls on the panel.
Upvotes: 3