0

How can we repaint our controls at run-time without flicker (hiding them first and showing them afterwards)?

Thank you

Faulty Orc
  • 955
  • 4
  • 13
  • 24
  • call Refresh() on the controls? – rene Feb 25 '11 at 13:22
  • 2
    Maybe a duplicate of http://stackoverflow.com/questions/220100/how-do-i-enable-double-buffering-of-a-control-using-c-window-forms – Simon Mourier Feb 25 '11 at 13:23
  • @rene does not work it is suppose to copy an image in picturebox to another one in different form but it needs a hide and show to work propoerly. – Faulty Orc Feb 25 '11 at 13:46
  • 2
    maybe share a simple code sample that demonstrates the behavior. Currently we are guessing – rene Feb 25 '11 at 14:10
  • 2
    duplicate of http://stackoverflow.com/questions/5116868/resources-related-to-hiding-and-showing-a-windows-form – Tony Abrams Feb 25 '11 at 15:34

1 Answers1

1

Use double buffering.

Maxim Gueivandov
  • 2,370
  • 1
  • 20
  • 33
  • My issue is lot more simpler: a copy of image from one form to another. that's it and the image is not that fancy! – Faulty Orc Feb 25 '11 at 13:44
  • @Faulty Orc, I don't see how the simplicity (of what?) factor could change anything. Have you just tried to set DoubleBuffered property of concerned controls to true and see what happens? Otherwise, as @Rene said, you'd need to provide more details/code snippets of what you are doing exactly (preferably by updating your question). – Maxim Gueivandov Feb 25 '11 at 15:16