本文介绍了我怎样才能让无尽的进度中的WinForms?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道一个动作会花费多长时间,我想在一个对话框中显示进度条给用户。我已经使用System.Windows.Forms.ProgressBar尝试,但它似乎并不支持它。

I don't know how long an action could take and I want to display a progress bar to the user in a dialog box. I've tried using System.Windows.Forms.ProgressBar but it doesn't seem to support it.

我会想什么的一个例子是进度条的窗口显示你当它在寻找互联网上的新的驱动程序。它只是有三个或四个棒来回滚动字幕样式的进度条。

An example of what I'd want is the progress bar that windows shows you when it's looking for new drivers on the internet. It's just got three or four 'bars' going back and forth marquee style on the progress bar.

我怎样才能做到这一点?

How can I do this?

推荐答案

System.Windows.Forms.ProgressBar有一个叫做财产风格。设置风格字幕将实现你想要的效果。

System.Windows.Forms.ProgressBar has a property called Style. Setting Style to Marquee will achieve the effect your looking for.

编辑: ​​迪沃指出跑马灯的仅适用于

Divo points out the Marquee Style is only available on

Windows XP家庭版,Windows XP专业x64版的Windows Server 2003

的意见提供指示,这似乎工作无处不在,只要你使用.NET 2.0或更高版本,甚至更多的信息。

The comments provide even more information indicating that this appears to work everywhere as long as you're using .NET 2.0 or higher.

这篇关于我怎样才能让无尽的进度中的WinForms?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 23:39
查看更多