stop the painting of a form

G

Guest

Hello,
I have a problem with a form loading a repainting. Because the form
uses an office 2000 styles, when it paints it causes a lot of flickering. The
standard advice is to set the following
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)

However this seems to make no difference. When the form loads it originall
appears in the old grey colour of classic windows and then quickly changes to
the new blue of
Office 2000 styles. This causes a lot of flickering, any ideas to reduce or
possible remove this so that the form appears fully formed. The form is an
inherited form so this may be another issue.
Regards
Robert
 
G

Guest

I have a problem with a form loading a repainting. Because the form
uses an office 2000 styles, when it paints it causes a lot of flickering. The
standard advice is to set the following
SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.AllPaintingInWmPaint, True)

However this seems to make no difference. When the form loads it originall
appears in the old grey colour of classic windows and then quickly changes to
the new blue of
Office 2000 styles. This causes a lot of flickering, any ideas to reduce or
possible remove this so that the form appears fully formed. The form is an
inherited form so this may be another issue.

If the problem is confined to the form load event, then do Me.Hide at the
top and Me.Show at the bottom of the load event handler. This works for me
in all cases where the first draw of a form is clunky.
 
G

GhostInAK

Hello AMercer,

YIKES.


Try using LockWindowUpdate() at the beginning and end of the paint cycle.

-Boo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top