C# Disabling a panel's refresh

What sort of graphics are these? Double buffering will probably help, especially if you are animating something. Just render your graphics to a Bitmap and when you are done draw it to the panel (the easiest way to do this is by setting the bitmap as the panel's background image and invalidating the panel with the bitmap's bounds when you want to refresh the image).
 
I'm already using double buffering (rendering to a bitmap and then showing all the graphics when done, I'm also using manual painting). As I said, it flickers only occasionally, like 3 times per minute or so, without double buffering it flickers every millisecond :)

Anyway, is there any way to disable the panels refresh, invalidate, paint event, calls? I don't know, it seems to me that its a refresh issue, as with manage DX where we need also to disable the form's refresh. Unfortunately that seems to have no effect on this problem of mine.

PS: I noticed that this happens specially when the OS displays some system messages like when we receive a pop-msn from message about receiving a new email... weird...
 
Have you tried inheriting the panel class and overriding the OnPaint and/or OnInvalidated methods?
 
Back
Top