Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disabling progress bar animation on Vista Aero

I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge.

On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge.

Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animation on this control?

To clarify, I want something basically identical to the 'disk space used' meters in Windows Explorer. No animation, but still with a nice border and shading effects.

Update:

I understand that I need a "meter", rather than a true progress bar. How can a themed meter be implemented using the standard windows progress bar control?

like image 966
Roddy Avatar asked Nov 24 '08 09:11

Roddy


2 Answers

As per the Vista UI guidelines for progress bars you should not be using a TProgressBar for such purposes at all, it states:

Use progress bars only for progress. Use meters to indicate percentages that aren't related to progress.

There are a lot of Third-Party components (for example Abakus VCL) that are aimed at Process Automation applications and the like, maybe you could use one of these controls instead?

like image 176
mghie Avatar answered Sep 29 '22 14:09

mghie


You can try turning themes off for that control;

SetWindowTheme(ProgressBar.Handle, ' ', ' ');
like image 21
Tim Knipe Avatar answered Sep 29 '22 14:09

Tim Knipe