wrote:
g = this.CreateGraphics();
This is bad code. Don't do it. Handle the paint event instead
wrote:
g.Clear(BackColor);
This wipes the text, which means that it draws a blank area. Therefore, it flickers.
If you handle the paint event and call Invalidate() in your timer to fire it, that will help. You can also turn on double buffering.
this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer,true);
Will do that.
Not sure how this code will play with the awful use of CreateGraphics, so fix that first.