Take a look at OpenNETCF.Windows.Forms.RoundGauge or OwnerDrawnList for
examples.
The main idea is to create a Bitmap object (offscreenBitmap), then by
using Graphics.FromImage you may get its Graphics object. All drawing
should come through this Graphics object. Then in OnPaint event draw
offscreenBitmap in the passed Graphics object.
Here is a small example how it can be done:
Bitmap offscreenBitmap;
Graphics offscreenGraphics;
...
offscreenBitmap = new Bitmap(Width, Height);
offscreenGraphics = Graphics.FromImage(offscreenBitmap);
...
protected override void OnPaint(PaintEventArgs e)
{
// all drawing goes here
// through "offscreenGraphics" object
e.Graphics.DrawImage(offscreenBitmap, 0, 0);
}
HTH
--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com
hi guys
do u have any idea how to do the double buffer in the compact framework?
i am actually using opennet cf's GDI code.. does someone have some
samples?
cheers