public partial class Transwindow : UserControl
{
public Transwindow()
{
InitializeComponent();
SetStyle(ControlStyles.SupportsTransparentBackColor
| ControlStyles.UserPaint
| ControlStyles.AllPaintingInWmPaint
| ControlStyles.Opaque, true);
this.BackColor = Color.Transparent;
}
protected override CreateParams CreateParams
{
get
{
//return base.CreateParams;
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x00000020; //WS_EX_TRANSPARENT
return cp;
}
}
}