Stop flickering

  • Thread starter Thread starter Louis
  • Start date Start date
L

Louis

Does anyone know a way of eliminating flickering in a pocket pc's picture box? I guess double buffering would be the answer but the examples I've seen are always to the entire Form, and not to a picture box. Thanks
 
Hi,

Try the double buffering in your picture box, override the OnPaint
method with this code :

//create the offscreen bitmap
Bitmap localBitmap = new
Bitmap(ClientRectangle.Width,ClientRectangle.Height);
Graphics bitmapGraphics = Graphics.FromImage(localBitmap);

//Draw things on the bitmap

//push our bitmap forward to the screen
g.DrawImage(localBitmap, 0, 0);

Check out this article if you need more information about GDI+.

BR


Fabien Decret
Windows Embedded Consultant
C# MCP

ADENEO (ADESET)

Louis a écrit :
 
Back
Top