Disabling progress bar animation on Vista Aero

二次信任 提交于 2019-11-28 11:12:18

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?

You can try turning themes off for that control;

SetWindowTheme(ProgressBar.Handle, ' ', ' ');
Bill

Try the VistaProBar at http://rmklever.com/ It does NOT have animation associated with it.

Roddy

I haven't tried it yet, but this question looks to have a useful answer for winforms.

How can I use a meter-style progress bar?

Now to convert it to Delphi...

Have a look at this forum thread. It is the only promising link I found, and the first posting mentions the different progress bar states, so changing the properties Smooth, State and Style will probably not help.

If the the tip in the last posting is indeed the only way to draw the progress bar in meter style, then your best option is to create a descendent class of TProgressBar, override the WM_PAINT handler, check for Vista and enabled themes, and in that case use the functions in UxTheme to paint the different parts of the control.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!