Tech Off Post

Single Post Permalink

View Thread: Label with transparent background in Windows Forms?
  • ploe

    I needed to do this will a Panel. Maybe it'll work for a Label too...

    protected override CreateParams CreateParams
    {
        get
        {
            CreateParams createParams = base.CreateParams;
            if (PaintMode == PanelPaintMode.Transparent)
                createParams.ExStyle |= 0x00000020; // WS_EX_TRANSPARENT
            return createParams;
        }
    }