0

I am having a windows form that whenever I want its controls like picturebox update normally I need to hide it and show it to let the cahnges happen. This causes a blink which I want to avoid.

Does anybody know what are my options? It is a picture box from form1 being copied to form2 and let the user see the changes.

Thanks

Faulty Orc
  • 955
  • 4
  • 13
  • 24
  • 1
    Duplicate of http://stackoverflow.com/questions/5116868/resources-related-to-hiding-and-showing-a-windows-form – Tony Abrams Feb 25 '11 at 15:33

2 Answers2

0

Why can you not change the control's attributes without hiding it?

Some options:

  1. Don't hide the controls before changing them.
  2. Show a loading animation overlay for the controls being updated (or the entire form if you are updating more than just a few).
  3. I'm not quite sure exactly what you're trying to do, but double buffering may help you out.

If these options don't help, please describe your issue in more detail and I will try to provide assistance.

Andrew Morton
  • 24,203
  • 9
  • 60
  • 84
FreeAsInBeer
  • 12,937
  • 5
  • 50
  • 82
0

I don't know if this will help, but, instead of hiding the picturebox, you can try:

PictureBox.Invalidate();

after you copy the picturebox

Alex Mendez
  • 5,120
  • 1
  • 25
  • 23