protected override void OnHandleCreated(EventArgs e) { InitializeStyles(); base.OnHandleCreated(e); haveHandle = true; } private void InitializeStyles() { SetStyle(ControlStyles.AllPaintingInWmPaint, true); SetStyle(ControlStyles.UserPaint, true); UpdateStyles(); } protected override CreateParams CreateParams { get { CreateParams cParms = base.CreateParams; cParms.ExStyle |= 0x00080000; // WS_EX_LAYERED return cParms; } }