A computer-graphics technique for updating a dynamic image that greatly reduces the visual artifacts, especially flicker, caused by the screen pixels being changed. The new image is drawn in a "hidden" buffer while the user still sees the old image, stored in a "visible" buffer (hence "double-buffering"). When the new image is fully drawn, the visible and the hidden buffers are switched very quickly and the hidden buffer content becomes visible.
Questions tagged [doublebuffered]
181 questions
58
votes
14 answers
How to double buffer .NET controls on a form?
How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker?

Ian Boyd
- 246,734
- 253
- 869
- 1,219
32
votes
1 answer
Winforms Double Buffering
I added this to my form's constructor code:
this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);
But it still shows ugly artifacts when it loads the controls, whenever they change (the form…

Xenoprimate
- 7,691
- 15
- 58
- 95
28
votes
10 answers
Winforms: SuspendLayout/ResumeLayout is not enough?
I have a library of a few "custom controls". Essentially we have our own buttons, rounder corner panels, and a few groupboxes with some custom paint. Despite the "math" in the OnPaint methods, the controls are pretty standard. Most of the time, all…

Martin Marconcini
- 26,875
- 19
- 106
- 144
25
votes
6 answers
How do I double buffer a Panel?
I have a panel that has a roulette wheel on it, and I need to double buffer the panel, so that it stops flickering. Can anyone help me out?
EDIT:
Yes, I have tried that.
panel1.doublebuffered does not exist, only this.doublebuffered. And I don't…
T-Fox
25
votes
4 answers
Why is DoubleBuffered disabled by default?
After creating a new form, I usually perform this ritual:
Change the name into something meaningful;
Type a Caption;
Change the position property (DefaultPosOnly is hardly ever what users expect);
Set ShowHint to true;
Set DoubleBuffered to true; …

Wouter van Nifterick
- 23,603
- 7
- 78
- 122
19
votes
4 answers
Java: how to do double-buffering in Swing?
EDIT TWO
To prevent snarky comments and one-line answers missing the point: IFF it is as simple as calling setDoubleBuffered(true), then how do I get access to the current offline buffer so that I can start messing with the BufferedImage's…

SyntaxT3rr0r
- 27,745
- 21
- 87
- 120
17
votes
4 answers
Why does the DoubleBuffered property default to false on a DataGridView and why is it protected?
We had a performance issue with DataGridViews where the redraw was horridly slow and found the solution Here to create a derived type and enable double buffering on the control.
(Derived type is necessary since the DoubleBuffered property is…

Karg
- 1,467
- 3
- 15
- 18
16
votes
2 answers
ControlStyles.DoubleBuffer vs. ControlStyles.OptimizedDoubleBuffer
What is the difference between ControlStyles.DoubleBuffer and ControlStyles.OptimizedDoubleBuffer?
ControlStyles.DoubleBuffer does not show up in the Intellisense drop down whereas ControlStyles.OptimizedDoubleBuffer is in fact listed.
The MSDN…
user113476
11
votes
1 answer
Double buffering with wxpython
I'm working on an multiplatform application with wxpython and I had flickering problems on windows, while drawing on a Panel.
I used to draw on a buffer (wx.Bitmap) during mouse motions events and my OnPaint method was composed of just on line:
dc =…

Emiliano
- 22,232
- 11
- 45
- 59
9
votes
4 answers
Double buffered ListBox
I have a CheckedListBox (WinForms) control (which inherits from ListBox; googling shows that the problem is with ListBox) that is anchored to all four sides of its form. When the form is resized, the ListBox has an ugly flicker. I tried inheriting…

SLaks
- 868,454
- 176
- 1,908
- 1,964
9
votes
4 answers
How do you double buffer in java for a game?
So in the game I'm working on, I have a marble follow the mouse, but when it does this the screen flickers.
The background includes two jpegs and 9 rectangles. How would I go about double buffering this? Here is the code for the main window.
/**
*…

Ryley Matos
- 137
- 2
- 2
- 3
8
votes
2 answers
How to eliminate the flicker on the right edge of TPaintBox (for example when resizing)
Summarization:
Say that I have a TForm and two panels. The panels are aligned alTop and alClient. The alClient panel contains a TPaintBox, whose OnPaint involve drawing codes.
The default value of DoubleBuffered on the components are false.
During…

SOUser
- 3,802
- 5
- 33
- 63
8
votes
3 answers
How do I enable double-buffering of a control using C# (Windows forms)?
How do I enable double-buffering of a control using C# (Windows forms)?
I have a panel control which I am drawing stuff into and also an owner-drawn tab control. Both suffer from flicker, so how can I enable double-buffering?

Gary Willoughby
- 50,926
- 41
- 133
- 199
8
votes
4 answers
Java Panel Double Buffering
wondered if anyone could point me in the right directon, i have developed a pong game and it needs double buffering due to flickering. Iv tryed some of the post on here to try and make it work, but im still a beginner with the swing awt suff, any…

user250643
- 221
- 3
- 4
- 8
7
votes
2 answers
Double buffering in Java on Android with canvas and surfaceview
How does one go about doing this? Could somebody give me an outline?
From what I've found online, it seems like in my run() function:
create a bitmap
create a canvas and attach it to the bitmap
lockCanvas()
call draw(canvas) and draw bitmap into…

Kalina
- 5,504
- 16
- 64
- 101