且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Windows 7 Aero主题进度栏错误?

更新时间:2023-12-06 12:16:10

它与进度条的动画有关。如果进度条为0%,并且将其设置为100%,则它不会跳到那里,而是为进度条动画化。如果太慢,您将在进度栏完成动画制作之前完成操作。因此,即使您已经将其设置为80%,90%和100%,动画仍然落后。

It has to do with the animation of the progress bar. If your progress bar is at 0% and you set it to 100% then it will not jump there, but animate the progress bar smoothly filling up. If this is too slow, you will be done before the progress bar finished animating. So even though you have already set it to 80, 90 and 100%, the animation still lags behind.

我从没找到关闭此功能的方法,但是我有解决方法。仅当您增加进度条时,动画才完成。如果向后移动,它将立即跳到该位置。因此,如果我希望进度条位于x%(x!= 100),则将其移至x + 1,然后移至x。如果我想以100%的价格将其移动到100%,99%和100%。 (或者使用任何值,您都会明白。)这足够快以至于不可见,您也可以将此代码保留在以前的Windows版本中(尽管我不知道)。

I never found a way to turn this off, however I have a workaround. The animation is only being done if you increment the progress bar. If you move it backwards, it will immediately jump to that position. So if I want the progress bar to be at x% (x != 100) then I move it to x+1 and then to x. If I want it at 100% I move it to 100, 99 and 100%. (Or whatever values you use, you get the idea.) This works fast enough to not to be visible, and you can leave this code in for previous Windows versions as well (though I don't).