1

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

4

2 回答 2

4

MdiContainer只是一个Form存在。因此,您只需在该表格上进行设置。IsMdiContainertrueDoubleBuffered = true

如果你的意思是MdiClient,我认为你必须尝试Reflection这样使用:

typeof(MdiClient).GetProperty("DoubleBuffered", BindingFlags.NonPublic | BindingFlags.Instance)
                 .SetValue(yourForm.Controls.OfType<MdiClient>().First(), true, null);
于 2013-09-14T03:31:05.203 回答
0

对我有用……只对我有用:

protected override CreateParams CreateParams
    {
        get
        {
            CreateParams cp = base.CreateParams;
            cp.ExStyle = API.WindowStylesEx.WS_EX_COMPOSITED;//| API.WindowStylesEx.WS_EX_LAYERED;

            return cp;
        }
    }

但是有这个问题

https://stackoverflow.com/questions/29488865/non-client-area-buttons-maximize-minimize-close-do-not-glow

于 2015-04-09T08:52:39.310 回答