stop the painting of a form

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Hello AMercer,

YIKES.


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

-Boo
 
Back
Top