Click here to Skip to main content
15,918,808 members
Home / Discussions / Graphics
   

Graphics

 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Luc Pattyn10-Mar-08 0:51
sitebuilderLuc Pattyn10-Mar-08 0:51 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Harvey Saayman10-Mar-08 1:22
Harvey Saayman10-Mar-08 1:22 
GeneralRe: ControlStyles.DoubleBuffer Issue Pin
Martin#12-Mar-08 3:43
Martin#12-Mar-08 3:43 
Questiondrawing in a rectangle? Pin
Harvey Saayman6-Mar-08 3:35
Harvey Saayman6-Mar-08 3:35 
GeneralRe: drawing in a rectangle? Pin
Luc Pattyn6-Mar-08 8:00
sitebuilderLuc Pattyn6-Mar-08 8:00 
GeneralRe: drawing in a rectangle? Pin
Harvey Saayman6-Mar-08 19:43
Harvey Saayman6-Mar-08 19:43 
GeneralRe: drawing in a rectangle? Pin
Harvey Saayman6-Mar-08 22:57
Harvey Saayman6-Mar-08 22:57 
GeneralRe: drawing in a rectangle? Pin
Luc Pattyn7-Mar-08 0:07
sitebuilderLuc Pattyn7-Mar-08 0:07 
Hi,

flickering is due to the amount of time it takes from erasing the first pixel to repainting
the last one. There is no perfect solution, but there are a lot of things that can help a lot:

1.
make sure not to waste CPU cycles in your paint code.
e.g. try using existing pens, brushes, fonts, whatever rather than creating (and disposing)
new ones all the time.

2.
the Control.DoubleBuffered property (since .NET 2.0) is useful; set it true, and .NET will
do all painting for it in an invisible bitmap then paint that in a flash to the screen.
It is transparant to your code, nothing really needs to be changed.
If only one Panel is flicker-critical, just set the DoubleBuffered property for that Panel;
you can set it for the entire Form, but then a larger area will have to be copied from
bitmap to screen every time.

3.
if that is insufficient, it becomes much more complicated.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralRe: drawing in a rectangle? Pin
Harvey Saayman7-Mar-08 0:54
Harvey Saayman7-Mar-08 0:54 
Generalthis.CreateGraphics() Issue Pin
Harvey Saayman5-Mar-08 21:32
Harvey Saayman5-Mar-08 21:32 
GeneralRe: this.CreateGraphics() Issue Pin
Tim Craig5-Mar-08 22:33
Tim Craig5-Mar-08 22:33 
GeneralRe: this.CreateGraphics() Issue Pin
Mark Salsbery6-Mar-08 6:06
Mark Salsbery6-Mar-08 6:06 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 19:45
Harvey Saayman6-Mar-08 19:45 
GeneralRe: this.CreateGraphics() Issue Pin
Luc Pattyn6-Mar-08 7:01
sitebuilderLuc Pattyn6-Mar-08 7:01 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 19:48
Harvey Saayman6-Mar-08 19:48 
GeneralRe: this.CreateGraphics() Issue Pin
Christian Graus6-Mar-08 20:49
protectorChristian Graus6-Mar-08 20:49 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 20:55
Harvey Saayman6-Mar-08 20:55 
GeneralRe: this.CreateGraphics() Issue Pin
Christian Graus6-Mar-08 21:29
protectorChristian Graus6-Mar-08 21:29 
GeneralRe: this.CreateGraphics() Issue Pin
Harvey Saayman6-Mar-08 21:43
Harvey Saayman6-Mar-08 21:43 
GeneralPush mode/Pull mode Pin
Sugantha5-Mar-08 19:55
Sugantha5-Mar-08 19:55 
GeneralRe: Push mode/Pull mode Pin
Mark Salsbery6-Mar-08 5:59
Mark Salsbery6-Mar-08 5:59 
Generalrendering video Pin
jossion4-Mar-08 19:16
jossion4-Mar-08 19:16 
GeneralRe: rendering video Pin
Mark Salsbery4-Mar-08 19:46
Mark Salsbery4-Mar-08 19:46 
GeneralRe: rendering video Pin
jossion4-Mar-08 22:52
jossion4-Mar-08 22:52 
GeneralRe: rendering video [modified] Pin
Mark Salsbery5-Mar-08 5:59
Mark Salsbery5-Mar-08 5:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.