Stop flickering

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
 
F

Fabien

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 :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top