读书人

winForm中设置Panel的透明度解决方法

发布时间: 2012-04-01 17:23:46 作者: rapoo

winForm中设置Panel的透明度
如题:怎样在winForm中设置我动态添加的Panel的透明度
System.Drawing.Color.FromArgb()方法只设置了颜色的透明度,而Panel没有透明!

C# code
private System.Windows.Forms.Panel LoadingPanel = new System.Windows.Forms.Panel();        public void PanelStart(System.Windows.Forms frm)        {            this.LoadingPanel.Location = new System.Drawing.Point(0, 0);            this.LoadingPanel.Dock = System.Windows.Forms.DockStyle.Fill;            this.LoadingPanel.Parent = frm;            this.LoadingPanel.BringToFront();            this.LoadingPanel.BackColor = System.Drawing.Color.FromArgb(200, 222, 235, 247);         }


[解决办法]
this.panel1.BackColor = System.Drawing.Color.Transparent;
赋颜色你换成这句看看
[解决办法]
Winform中的Panel貌似透明不太好用 你可以用窗体模拟一个Panel
[解决办法]
0.0我试过好使啊,=A=你说的透明指的是神马啊,不会是panel下面有个控件你想给显示出来吧
[解决办法]
设置Opacity属性

读书人网 >C#

热点推荐