日期:2014-05-17 浏览次数:20781 次
public class PanelEx : Panel
{
public PanelEx()
{
BackColor = Color.Transparent;
Paint += new PaintEventHandler(TransparentRender);
}
private void TransparentRender(object sender, PaintEventArgs e)
{
using (Brush brush = new SolidBrush(Color.FromArgb(0, 255, 255, 255)))
{
e.Graphics.FillRectangle(brush, e.ClipRectangle);
e.Graphics.Flush();
}
}
}