HighTechTalks DotNet Forums  

Stop flickering

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Stop flickering in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Louis
 
Posts: n/a

Default Stop flickering - 11-28-2006 , 02:55 PM






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

Reply With Quote
  #2  
Old   
Fabien
 
Posts: n/a

Default Re: Stop flickering - 11-28-2006 , 03:49 PM






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.Heigh t);
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 :

Quote:
Does anyone know a way of eliminating flickering in a pocket pc's picturebox? 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


Reply With Quote
  #3  
Old   
Mark Arteaga
 
Posts: n/a

Default Re: Stop flickering - 11-28-2006 , 03:51 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
---

Quote:
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




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.