ControlStyles.DoubleBuffer vs ControlStyles.OptimizedDoubleBuffer

What is the difference between ControlStyles.DoubleBuffer and ControlStyles.OptimizedDoubleBuffer?

ControlStyles.DoubleBuffer is not displayed in the Intellisense drop-down list, while ControlStyles.OptimizedDoubleBuffer is actually specified.

The MSDN documentation does not immediately make a difference (at least for me).

+13
controls winforms doublebuffered
Dec 27 '09 at 22:28
source share
2 answers

I found this thread on the topic:

DoubleBuffered = true sets as ControlStyles.OptimizedDoubleBuffer AND ControlStyles.AllPaintingInWmPaint.

At some point, the intention was to abandon DoubleBuffer and use OptimizedDoubleBuffer instead, however the flow comes for reasons why this might be a bad idea (which I don't understand)

It seems that the whole situation is a bit confused, but ultimately these two flags do very similar things - the flow indicates that there are still subtle differences between OptimizedDoubleBuffer and DoubleBuffer, but does not explain what they are.

+7
Dec 27 '09 at 22:54
source share

Interesting. Lead me to search the web.

from Microsoft

The documentation for OptimizedDoubleBuffer indicates that this will help reduce flicker and has the same effect as setting UserPaint and AllPaintingInWmPaint ControlStyles to true. However, if the OptimizedDoubleBuffer ControlStyle parameter is set to true without setting the UserPaint and AllPaintingInWmPaint parameters, there is no visible reduction in flicker. Setting UserPaint and AllPaintingInWmPaint ControlStyles will result in the same optimized flicker optimization as in Visual Studio 2003 when configuring DoubleBuffer, UserPaint and AllPaintingInWmPaint ControlStyles. In other words, there is no difference between OptimizedDoubleBuffer and the deprecated DoubleBuffer.

http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94096

+3
Dec 27 '09 at 22:44
source share



All Articles