Hi,
I read all threads to this topic which were exactly like my problem and I tried all solutions but it still doesnt want to work :(. Can anybody help?
I wrote an application where you can create your own graph by adding
curve points into a coordinate system grid. I create a Panel and draw everything on it.
Also you can pick the control points and drag them to another
spot. If I do so, I get such a bad flicker effect (only in the panel)
and sometimes the whole background is blank.
my paint method looks like this:
private void PaintTF(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Graphics.FromImage(myBitmap).Clear(System.Drawing. Color.LightGray);
Graphics bufferedGraphics = Graphics.FromImage(myBufferBitmap);
bufferedGraphics.DrawImage(myBitmap, 0, 0);
bufferedGraphics.DrawAllTheStuff....
g.DrawImage(myBufferBitmap, 0, 0);
bufferedGraphics.Dispose();
}
And in the MouseMove method i do Panel.Refresh(). I also tried overriding the this.OnPaintBackground and this.OnPaint but then my graph gets drawn behind the panel but it is supposed to be on the panel. If anybody can help me with that, I would be so happy.
cheers