透明的Panel

  • 1303
  • 0

透明的Panel


 public class CPanel: Panel
    {
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams createParams = base.CreateParams;
                createParams.ExStyle |= 0x00000020; // WS_EX_TRANSPARENT
                return createParams;
            }
        }

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            //    base.OnPaintBackground(e);
        }

       protected override void OnPaint(PaintEventArgs e)
        {
            //    base.OnPaint(e);
        }
    }

 

===================

搞了C#

現在來學學維修筆電