Steve,
Why a label? I would start with Control or UserControl...
In your user control's constructor you should use the following:
' Stop the flicker
Me.SetStyle(ControlStyles.UserPaint, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.UpdateStyles()
The ControlStyles.DoubleBuffer is .NET's method of having a second Graphics
object as Tyson was suggesting. The other settings help out, see online help
for specifics on each ControlStyle.
After you include the above in your constructor, you only need to handle the
Paint event and paint your control's surface.
Hope this helps
Jay
"steve" <a@b.com> wrote in message news:10************@corp.supernews.com...
ok, ok...obj.suspendlayout/resumelayout. but it isn't helping and i need
advice. i have a custom progress bar made from a label control. i manually
paint it when the progress changes. i'm drawing a filled, rounded
rectangle twice w/n the label...once to give a light background color, the second
time is the show the progress. the third paint operation is to draw the
progress info text w/n the label. everything works just fine, but when progress
changes rapidly, i get flickering of all text and color layers...even
though i'm suspending layout ops prior to the graphics changes, then resuming.
any ideas on a quick fix...or anyone know how i can apply these graphics
operations to the label all at once?
tia,
steve