J
jp2msft
I am trying to set the Alpha value for a Control Color in a very simple way,
but it is not working. I wanted the forum's input as to if my technique can
be done or if I am simply not doing it incorrectly.
I am experimenting with a Panel Control that is placed on a Windows Form
(.NET Framework 2.0 & VS2005).
To make the Panel transparent, I have added this short line of code:
private void Button1_Click(object sender, EventArgs e)
{
Panel1.BackColor = Color.FromArgb(50, Color.White);
}
Are there flaws in this simple logic?
Must I use the Graphics object to set the BackColor?
Using the code above, the Control's BackColor remains at 100% opacity, which
is *not* what I want.
Thanks for your input,
Joe
but it is not working. I wanted the forum's input as to if my technique can
be done or if I am simply not doing it incorrectly.
I am experimenting with a Panel Control that is placed on a Windows Form
(.NET Framework 2.0 & VS2005).
To make the Panel transparent, I have added this short line of code:
private void Button1_Click(object sender, EventArgs e)
{
Panel1.BackColor = Color.FromArgb(50, Color.White);
}
Are there flaws in this simple logic?
Must I use the Graphics object to set the BackColor?
Using the code above, the Control's BackColor remains at 100% opacity, which
is *not* what I want.
Thanks for your input,
Joe