Groups | Blog | Home
all groups > dotnet compact framework > november 2006 >

dotnet compact framework : Stop flickering



Louis
11/28/2006 11:55:22 AM
Fabien
11/28/2006 12:49:50 PM
Hi,

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

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

//Draw things on the bitmap

//push our bitmap forward to the screen
g=2EDrawImage(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 =E9crit :

[quoted text, click to view]
box? I guess double buffering would be the answer but the examples I've se=
en are always to the entire Form, and not to a picture box. Thanks
Mark Arteaga
11/28/2006 8:51:04 PM
You would use the same technique in the picturebox.

--
Mark Arteaga
Principal Partner
OpenNETCF Consulting
http://www.opennetcf.com | http://blog.markarteaga.com

---
Get the Smart Device Framework Community Edition at www.smartdeviceframework.com
---

[quoted text, click to view]

AddThis Social Bookmark Button