By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

Suppressing form display

P: n/a
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?
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Geoff Hanna" <gh****@nospam.gtiemail.com> scripsit:
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'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
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!
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.