0

我有一个 Dev Express Windows 窗体应用程序,它有大量的闪烁,尤其是在启动时。

我对它应用了这个修复。

protected override CreateParams CreateParams
{
    get
    {
        CreateParams cp = base.CreateParams;
        cp.ExStyle |= 0x02000000;   // WS_EX_COMPOSITED

        return cp;
    }
}

此代码修复了闪烁问题,但它使用了 30-50 CPU 使用率。

如何解决这个问题?

4

2 回答 2

1

您可以尝试为表单设置 DoubleBuffered = true 吗?我不确定它是否适用于 DevExpress。您可以找到相同的 MSDN 主题 - How to: Reduce Graphics Flicker with Double Buffering for Forms and Controls

于 2014-06-03T07:18:24.630 回答
0

It also depends on what type of controls are on the form. DevExpress has many controls that have a .SuspendLayout() and .ResumeLayout() which prevent flickering and hang-ups while the specific control is being loaded.

于 2014-06-28T02:33:29.260 回答