Possible Duplicates:
How do I double buffer a Panel in C#?
c# panel for drawing graphics and scrolling
I draw a bitmap on a panel, i use zooming on the same panel. While zooming the panel is continuously flickering. Why do not panel have the DoubleBuffered property?
Code:
Graphics g = Graphics.FromHwnd(panel.Handle);
if (newImage == true)
{
g.Clear(SystemColors.Control);
newImage = false;
}
g.DrawImage(bmp, hOffset, vOffset);
g.Dispose();