Disable WinForms ProgressBar animation

后端 未结 6 1803
温柔的废话
温柔的废话 2020-12-03 22:03

Is there a possbility to disable animation of the progress bar?

I need it for some pocess which is paused and not running at the moment. An average user would think

6条回答
  •  感动是毒
    2020-12-03 22:22

    The standard means of communicating to a user that an action is either paused or can't be accurately measured is to use the marquee display style.

    progressBar1.Style = ProgressBarStyle.Marquee;
    

    This style ignores the Maximum and Value properties and displays a progress bar "segment" that continually moves across the progress bar and loops around (it doesn't fill the progress bar, it moves what looks like a section of the bar all the way across the control and around to the beginning again.)

提交回复
热议问题