Suppressing form display

  • Thread starter Thread starter Geoff Hanna
  • Start date Start date
G

Geoff Hanna

I have a complicated form that manages lots of panels.

When the user wants a new panel, the old one is disposed
and a new one constructed so only one panel is actually in
existance at one time.

Some of the panels display data and have to make a trip to
the database to get it.

The result is a lot of flashing and an uneven appearance.
I want to suppress all Paint events while a panel is being
constructed and populated.

I've tried Suspend/Resume Layout but it is not stopping
the visual flashing.

So how do I completely suppress display?
 
* "Geoff Hanna said:
When the user wants a new panel, the old one is disposed
and a new one constructed so only one panel is actually in
existance at one time.

Some of the panels display data and have to make a trip to
the database to get it.

The result is a lot of flashing and an uneven appearance.
I want to suppress all Paint events while a panel is being
constructed and populated.

I've tried Suspend/Resume Layout but it is not stopping
the visual flashing.

You can try it with the 'LockWindow' API call or 'SendMessage' +
'WM_SETREDRAW'.
 
Thanks!

I had some issues applying this, particularly in timing;
turning the display off and then back on screwed up
repainting and made a truly weird form. But judicious use
of DoEvents resolved the timing issue and now my form
looks great!
 
Back
Top