C# Windows form 透明 panel (transparent panel)
using System.Windows.Forms; namespace XXX_namespace { /// /// A transparent control. /// public class TransparentPanel : Panel { public TransparentPanel() { } protected override CreateParams CreateParams { get { CreateParams createParams = base.CreateParams; createParams.ExStyle |= 0x00000020; // WS_EX_TRANSPARENT return createParams; } } protected override void OnPaintBackground(PaintEventArgs e) { // Do not paint background. } } }