Hi Herfried
I thought SuspendLayout and ResumeLayout would be what I need. But it
appears that if you use this on a form, the underlying controls still
draw themselves in sequence once you resume layout.
What I did was wrap my code in me.SuspendLayout and me.ResumeLayout. I
then did a loop and removed all of the picture boxes on the form and
then a second loop and added them back. The screen blinked blank
showing I had removed the picture boxes and then displayed them.
Am I missing something?
TIA,
John
On Thu, 5 May 2005 10:18:31 +0200, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"J L" <jo**@marymonte.com> schrieb:I am removing and adding picture boxes on a form. I would like to have
the old image form remain until I have completed the changes. Is that
possible? As it is now, the form appears to blink as I remove the old
images and add the new ones. And the set of images displayed is not
the same from one state to the next. So I delete all the old ones
first (effectively clearing the screen) before adding the new ones.
Take a look at 'Control.SuspendLayout' and 'Control.ResumeLayout' for
suspending layouting.
If you want to prevent a control from redrawing, take a look at the article
below:
Preventing controls from redrawing
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=disableredrawing&lang=en>