Home
Manage Your Code
Snippet: transparent component (C#)
Title: transparent component Language: C#
Description: this is essential to create a component with transparent background Views: 162
Author: stephan alutis Date Added: 7/8/2008
Copy Code  
1        protected override CreateParams CreateParams
2        {
3            get
4            {
5                CreateParams cp = base.CreateParams;
6                cp.ExStyle |= 0x20;
7                return cp;
8            }
9        }
10
11public constructor()
12{
13            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
14            this.SetStyle(ControlStyles.Opaque, true);
15}
Usage
c & p