Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / May 2005

Tip: Looking for answers? Try searching our database.

How to stop jumpy drawing...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dwhittenburg - 26 May 2005 14:32 GMT
Is there a way to not show anything until everything is drawn?

I thought I read somewhere on here how to do this...I just can't remember
what to search for or else I would...
Chris Tacke, eMVP - 26 May 2005 14:39 GMT
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

> Is there a way to not show anything until everything is drawn?
>
> I thought I read somewhere on here how to do this...I just can't remember
> what to search for or else I would...
dwhittenburg - 26 May 2005 14:53 GMT
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...
Lebesgue - 26 May 2005 14:40 GMT
Look for double buffering, if I understand your question, that is what you
want to achieve

> Is there a way to not show anything until everything is drawn?
>
> I thought I read somewhere on here how to do this...I just can't remember
> what to search for or else I would...
dwhittenburg - 26 May 2005 14:53 GMT
will search for it

thanks

> Look for double buffering, if I understand your question, that is what you
> want to achieve
[quoted text clipped - 3 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...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.