Is there any way to set a double buffer form being a mdi container at the same time?
I've tried to draw the controls but it doesn't active the double buffer feature, so my graphics are blinking
Is there any way to set a double buffer form being a mdi container at the same time?
I've tried to draw the controls but it doesn't active the double buffer feature, so my graphics are blinking
MdiContainer
只是一个Form
存在。因此,您只需在该表格上进行设置。IsMdiContainer
true
DoubleBuffered = true
如果你的意思是MdiClient
,我认为你必须尝试Reflection
这样使用:
typeof(MdiClient).GetProperty("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance)
.SetValue(yourForm.Controls.OfType<MdiClient>().First(), true, null);
对我有用……只对我有用:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle = API.WindowStylesEx.WS_EX_COMPOSITED;//| API.WindowStylesEx.WS_EX_LAYERED;
return cp;
}
}
但是有这个问题