ProgressBar is slow in Windows Forms

前端 未结 5 2170
不知归路
不知归路 2020-12-03 07:40

I\'m using Windows Vista and Visual Studio 2010. Create a .Net 4 Windows Forms Application. Drop a progress bar on the default form, add code to handle the form load event a

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-03 08:30

    A much simpler answer, as shown here, is to do this:

    pbar.Value = value;
    pbar.Value = value - 1;
    pbar.Value = value;
    

    Explanation:

    It animates the PB as it increases, but not while it decreases. And that is why the above hack sppears to 'fix' the problem.

提交回复
热议问题