日期:2014-05-18  浏览次数:22490 次

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属性