HypernovaDesktop Components · docs
Binarymission
WinFormsDouble Buffered Control Base › DoubleBufferedControlBase

DoubleBufferedControlBase

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.BaseControls

A base class for owner-drawn controls that need flicker-free painting.

public abstract class DoubleBufferedControlBase : Control

Inherits from / implements: Control

Remarks

Two separate mechanisms are switched on here, and both are needed. OptimizedDoubleBuffer makes Windows Forms paint the control into an off-screen buffer and blit the finished result, which removes the flicker caused by a complex OnPaint drawing directly to the screen. WS_EX_COMPOSITED extends the same idea to the whole control hierarchy: child controls are composited off-screen too, so a container with many children no longer flashes as each child paints in turn. Double buffering alone does not fix that, because it only covers the one control's own drawing.

Members at a glance

DoubleBufferedControlBaseInitializes a new instance of the DoubleBufferedControlBase class.
CreateParamsGets the creation parameters for the control window, with composited painting requested.

Constructors

DoubleBufferedControlBase

protected DoubleBufferedControlBase()

Initializes a new instance of the DoubleBufferedControlBase class.

Properties

CreateParams

protected override CreateParams CreateParams

Gets the creation parameters for the control window, with composited painting requested.