Re: smooth progress bar flickering

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Jeff Johnson [MVP: VB] (i.get_at_enough.spam)
Date: 08/18/04


Date: Wed, 18 Aug 2004 14:27:43 -0400


"Brian Henry" <brianiupmsdn@newsgroups.nospam> wrote in message
news:ORYiw7ThEHA.2764@TK2MSFTNGP11.phx.gbl...

> I created a smooth progress bar with this code.. but if you update the
> values in a row quickly of it and watch it on screen it flickers... how
> would i change this to reduce the flickering? thanks...

I didn't scan the code in its entirety, but I have a suggestion which may
apply. If you are clearing the drawing area every time you draw a new
value...don't! This is most likely what is causing the flicker. Keep
internal variables that know what the old value was and clear the drawing
area only if the progress bar is getting smaller. Otherwise just draw over
what's already there.



Relevant Pages

  • Re: Drawing DirectX surface to an Image (possible?)
    ... try setting the DoubleBuffered property to ... I need to draw directx output during the OnPaint in the graphics object ... I tried dynamically creating a panel and adding it ... after other things are drawn on the form, it just flickers badly. ...
    (microsoft.public.win32.programmer.directx.managed)
  • Re: User drawn custom control flickers when moved
    ... I'm developing a custom winforms control that uses the Graphics objects to ... draw itself to the default UserControl panel. ... draw some very basic things, it flickers when I move ... I can see some tearing in the control's image (or whatever ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • No double-buffering on a Panel?
    ... I would like to draw to a Panel, but it flickers like crazy when resized. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Viewex MFC example flickering
    ... I thought you meant the drawing area and not the form. ... area that flickers) ... > Thanks a lot Christopher .. ... >> What you do, is create a bitmap, the size of the Viewing area. ...
    (microsoft.public.vc.mfc)