Stopping form repainting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm making various changes to the controls on a form and the form flickers as images are loaded etc. Is there a way to stop the form showing the updates until they have been completed? e.g. Form.Painting = False

I'm sure this is very easy but I can't seem to find a way of doing it!

Many thanks

Alan
 
is it suspendlayout and resumelayout you need?

Dominique

--

"I didn't think it was physically possible, but this both sucks and
blows." - Bart Simpson


Alan Lambert said:
Hi,

I'm making various changes to the controls on a form and the form flickers
as images are loaded etc. Is there a way to stop the form showing the
updates until they have been completed? e.g. Form.Painting = False
 
is it suspendlayout and resumelayout you need?
It is, indeed. I can't believe I missed that!

Many thanks

Alan
 
* =?Utf-8?B?QWxhbiBMYW1iZXJ0?= said:
I've looked at the link you suggested.

I would have thought that it would be quite simple within vb.net. I
assumed that there would be some equivalent to MSAccess's Form.Painting
= False.

I don't think that there is an 1:1 replacement.
Is there no other way of doing this other than using Windows API? If
so, how do you access the API from vb.net? Is it in the same way as VB6?

It's similar, but not equal.
I did look at the SuspendLayout/ResumeLayout suggested above but it
turns out they don't do what I wanted.

It will only disable Windows Forms' layout logic.
 
Back
Top