Canvas.DoubleBuffer

From Xojo Documentation

Property (As Boolean )
aCanvas.DoubleBuffer = newBooleanValue
or
BooleanValue = aCanvas.DoubleBuffer

New in 2009r1

Supported for all project types and targets.

If True, the Canvas will be double-buffered.

Notes

Double-buffering requires additional memory and the Canvas loses its transparency. Since macOS and Linux already double-buffer the user interface, this property is most useful on Windows.

If DoubleBuffer is True, then you should set EraseBackground to False. If EraseBackground is not disabled, then it will cause the Canvas to flicker.

Sample Code

The following code in the Open event of the Canvas enabled double-buffering:

Me.DoubleBuffer = True
Me.EraseBackground = False