Click here to Skip to main content
15,887,175 members
Home / Discussions / C#
   

C#

 
GeneralDrawing 3D piechart(the 3D depth part) Pin
Alan Zhao8-May-04 9:07
Alan Zhao8-May-04 9:07 
Questiondataset data tostring??? Pin
gman448-May-04 9:07
gman448-May-04 9:07 
AnswerRe: dataset data tostring??? Pin
Heath Stewart8-May-04 20:14
protectorHeath Stewart8-May-04 20:14 
GeneralArrays of Structures in C# .net Beginner Pin
ProgrammerA8-May-04 8:34
ProgrammerA8-May-04 8:34 
GeneralRe: Arrays of Structures in C# .net Beginner Pin
Jeff Varszegi8-May-04 11:12
professionalJeff Varszegi8-May-04 11:12 
GeneralMessage Closed Pin
8-May-04 7:33
Oshada Athulathmudali8-May-04 7:33 
GeneralRe: Flickering Images Pin
Mazdak8-May-04 8:57
Mazdak8-May-04 8:57 
GeneralRe: Flickering Images Pin
Heath Stewart8-May-04 20:09
protectorHeath Stewart8-May-04 20:09 
Besides double-buffering, another problem could be that you're waiting to extract the bitmap from the assembly as an embedded resources until the event fires. This will take some time.

Either pre-extract and buffer the image before the event is fired (like buffering the next and previous images if you're not sure which will be next to display), or don't dispose of the image in the PictureBox until the other bitmap is ready.

Double-buffering will help the situation where you replace the bitmap in the PictureBox, however. Instead of disposing the current image and reading the next image in (so there's some "dead time" in between), the new image is drawn to an off-screen, compatible bitmap and displayed only once it has been rendered to this compatible bitmap. It can then be swapped with the on-screen bitmap fast enough that you shouldn't notice (large images may still flicker a little, however). .NET makes this pretty easy by setting the AllPaintingInWmPaint, DoubleBuffer, and UserPaint ControlStyles enum members using the protected SetStyle method (which requires that you'd extend the PictureBox control.

 

Microsoft MVP, Visual C#
My Articles
GeneralXML Serialization Pin
Diego F.8-May-04 7:26
Diego F.8-May-04 7:26 
GeneralRe: XML Serialization Pin
Mazdak8-May-04 8:36
Mazdak8-May-04 8:36 
GeneralRe: XML Serialization Pin
Diego F.8-May-04 14:44
Diego F.8-May-04 14:44 
Generalaccessing a property through several classes Pin
cristina_tudor8-May-04 6:29
cristina_tudor8-May-04 6:29 
GeneralRe: accessing a property through several classes Pin
ian mariano8-May-04 6:35
ian mariano8-May-04 6:35 
GeneralRe: accessing a property through several classes Pin
Meysam Mahfouzi8-May-04 6:46
Meysam Mahfouzi8-May-04 6:46 
GeneralRe: accessing a property through several classes Pin
ian mariano8-May-04 7:23
ian mariano8-May-04 7:23 
GeneralRe: accessing a property through several classes Pin
Meysam Mahfouzi8-May-04 6:38
Meysam Mahfouzi8-May-04 6:38 
GeneralRe: accessing a property through several classes Pin
Jeff Varszegi8-May-04 11:07
professionalJeff Varszegi8-May-04 11:07 
Generalchecklistbox Pin
alsalahy8-May-04 5:43
alsalahy8-May-04 5:43 
GeneralRe: checklistbox Pin
ian mariano8-May-04 6:40
ian mariano8-May-04 6:40 
GeneralClosing an open Task Manager window Pin
Nagendra Kamath K8-May-04 5:00
Nagendra Kamath K8-May-04 5:00 
GeneralRe: Closing an open Task Manager window Pin
ian mariano8-May-04 6:42
ian mariano8-May-04 6:42 
GeneralRe: Closing an open Task Manager window Pin
Heath Stewart8-May-04 20:04
protectorHeath Stewart8-May-04 20:04 
GeneralRe: Closing an open Task Manager window Pin
ian mariano13-May-04 18:42
ian mariano13-May-04 18:42 
GeneralRe: Closing an open Task Manager window Pin
Heath Stewart14-May-04 2:03
protectorHeath Stewart14-May-04 2:03 
GeneralRe: Closing an open Task Manager window Pin
ian mariano14-May-04 3:36
ian mariano14-May-04 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.