All correct. Consider using
Control.DoubleBuffered
, assign it to
true
— usual effective tool to overcome flickering. To do that, you need to create your own control for drawing, because this member is
protected
:
internal class MyControl : Control {
internal MyControl() { DoubleBuffered = true; }
}
Also, something not related to flicker, but helpful to improve performance: when you change something in graphics, to trigger control's
Paint
event you will need to call
Control.Invalidate
. Instead of usual parameter-less
Invalidate
use
Invalidate
with parameters, which allows you to invalidate only a modified part of the scene.
[EDIT]
Do yourself a favor, use custom
Control
for painting (sub-classed as I show above), not
Form
. With
Form
you loose bit chunk of flexibility.
—SA