I'm using a panel to draw my GDI+ graphics but sometimes the panel flickers to its predefined back color. How can I disable the a panel's painting / refresh function?
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.