转载自:http://www.dotblogs.com.tw/rainmaker/archive/2012/02/22/69811.aspx
解决方案:
在调用用户控件的窗体里面添加一下代码:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED
return cp;
}
}
在用户控件里面添加一下代码:
protected override CreateParams CreateParams
{
get
{
var parms = base.CreateParams;
parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN
return parms;
}
}