I found this thread on the subject.
Note: below is about the protected Control
property, not the ControlStyles
:
DoubleBuffered = true sets both ControlStyles.OptimizedDoubleBuffer AND ControlStyles.AllPaintingInWmPaint.
Per WinForms documentation, above is the preferred usage.
Alternatively one could set the ControlStyle as well through SetStyle
.
At one point the intention was to deprecate DoubleBuffer and adopt the use of OptimizedDoubleBuffer instead, however the thread goes into reasons why that might be a bad idea (that I dont understand)
It looks like the whole situation is a tad confused, however ultimately these two flags do very similar things - the thread indicates that there are still subtle differences between OptimizedDoubleBuffer and DoubleBuffer, but doesnt explain what they are.