panel - double buffered in c# -


possible duplicates:
how double buffer panel in c#?
c# panel drawing graphics , scrolling

i draw bitmap on panel, use zooming on same panel. while zooming panel continuously flickering. why not panel have doublebuffered property?

code:

                graphics g = graphics.fromhwnd(panel.handle);                 if (newimage == true)                 {                     g.clear(systemcolors.control);                     newimage = false;                 }                  g.drawimage(bmp, hoffset, voffset);                 g.dispose(); 

add code inside constructor

this.setstyle(controlstyles.allpaintinginwmpaint |controlstyles.userpaint |controlstyles.doublebuffer, true); 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

c# - how to write client side events functions for the combobox items -

ssh client with paramiko (python) -