Note that there are some explanatory texts on larger screens.

plurals
  1. POAnimated "glow" in owner-drawn Progress Bar (ListView/DataGridView)
    text
    copied!<p>I've noticed that the bog-standard ProgressBar in .NET 2.0 (Winforms) does show up as the fancy animated glowing bar in Vista; however, using the ProgressBarRenderer (as one generally has to when trying to draw a progress bar in an owner-drawn list view, grid view, or other such control) just gives the visual style without the pretty animation.</p> <p>I guess it was silly to expect that this would just magically work - I imagine the native control in Vista must have some sort of embedded timer or thread that obviously doesn't exist when drawing a static image. I did see that if you redraw a ProgressBar control several times in succession (using DrawToBitmap) that you can actually see the distinct stages of the animated glow, so I experimented with using a timer to keep redrawing automatically, but something's just not quite right about the look, and it also eats up a lot more CPU time than an actual ProgressBar does.</p> <p>This seems to leave me with two sub-standard options: a) Use the ProgressBarRenderer and end up with a Vista "look" but no animation; or b) Use a timer to continually redraw several ProgressBars to bitmaps, and waste CPU cycles to get it looking better but still not perfect.</p> <p>I was wondering if anybody has had experience embedding progress bars inside owner-drawn controls and might know of a better way than the two options above - something that can accurately reproduce the glow/glint without relying on timers and/or hammering the CPU.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload