C# 解决winform 窗体控件在窗体变化时闪烁的问题(转)
作者:互联网
在窗体form代码中加入如下代码即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base .CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
|
UserControl的Code
1 2 3 4 5 6 7 |
protected override CreateParams CreateParams {
get {
var parms = base .CreateParams;
parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN
return parms;
}
}
|
https://www.cnblogs.com/fuhang/p/8721325.html
标签:控件,C#,CreateParams,0x02000000,窗体,override,cp,parms 来源: https://www.cnblogs.com/xihong2014/p/15368564.html