We'll need a bit more info. What's the context? If you're drawing into a
Graphics object, then draw to an offscreen buffer, then blit the result to
the screen when you're done (commonly called double buffering).

Signature
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
I've created a square object for a calendar...When building the calendar I
draw all these squares on the screen...They are drawn one by one instead of
all at once, I just didn't know if there was a screen suspend or something
untill I'm ready to show it...
I will search for double buffering...
Thanks
> We'll need a bit more info. What's the context? If you're drawing into a
> Graphics object, then draw to an offscreen buffer, then blit the result to
[quoted text clipped - 4 lines]
>> I thought I read somewhere on here how to do this...I just can't remember
>> what to search for or else I would...
Alex Feinman [MVP] - 26 May 2005 20:27 GMT
In short -
1) create a bitmap size of your control
2) In your Paint event handler draw everyithing you need on the Graphics
object created from that bitmap (Graphics.FromImage). This Graphics object
needs to be created once and stored. You can optimize the drawing by
painting only those elements that intersect with e.ClipRect
3) when done, do this:

Signature
Alex Feinman
---
Visit http://www.opennetcf.org
> I've created a square object for a calendar...When building the calendar I
> draw all these squares on the screen...They are drawn one by one instead
[quoted text clipped - 13 lines]
>>> I thought I read somewhere on here how to do this...I just can't
>>> remember what to search for or else I would...
Alex Feinman [MVP] - 26 May 2005 20:30 GMT
Sorry, sent too early.
In short -
1) create a bitmap size of your control (m_bmOff)
2) In your OnPaint override draw everyithing you need on the Graphics
object created from that bitmap (Graphics.FromImage). This Graphics object
needs to be created once and stored. You can optimize the drawing by
painting only those elements that intersect with e.ClipRectangle
3) when done, do this:
e.Graphics.DrawImage(m_bmOff, e.ClipRectangle, e.ClipRectangle,
GraphicsUnit.Pixel);

Signature
Alex Feinman
---
Visit http://www.opennetcf.org
> I've created a square object for a calendar...When building the calendar I
> draw all these squares on the screen...They are drawn one by one instead
[quoted text clipped - 13 lines]
>>> I thought I read somewhere on here how to do this...I just can't
>>> remember what to search for or else I would...