如何显示两个窗体之间的进度条 [英] How to show the progress bar between two forms

查看:114
本文介绍了如何显示两个窗体之间的进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我需要在2个表单之间插入一个进度条,单击按钮打开窗口时需要一个主表单,我需要等待加载最后一个窗口,然后我决定使用进度条显示剩余的打开时间要求的窗口.
现在我不知道如何在代码中实现此功能(这是我第一次使用进度条).


您有什么建议可以帮助我实现此功能吗?


感谢您的关注.

Hi all,
i need to insert a progress bar between 2 forms ,i have a Main Form when i click a button to open a window i need wait before to load the last one window and i decide to use a Progress Bar to show the time remaining to open the Window requested.
Now i dont know how implement in code this feature (its the first time i use a Progress Bar) .


Do you have any advice to help me how work out this feature?


Thanks for your attention.

推荐答案

使用进度条很简单.您只需在设置范围后设置位置.但是,问题是,您的其他表单在做什么,以便您可以将其细分为多个步骤,并相应地设置进度栏?如果您的其他形式在主线程上做很多事情,则需要调用Application.DoEvents()以获取进度条以重新绘制自身.您可以使用委托将邮件发送回您的主表单.
Using a progress bar is trivial. You just set the position after setting the range. However, the question is, what is your other form doing, so that you can break it down in to steps, and set the progress bar accordingly ? If your other form is doing a lot of stuff on the main thread, you need to call Application.DoEvents() to get the progress bar to repaint itself. You can use a delegate to send messages back to your main form.



http://www.daniweb.com/software-development/csharp/threads/213583 [ ^ ]

我想这可以帮助您....
只需检查一下... :)

谢谢.
hi
http://www.daniweb.com/software-development/csharp/threads/213583[^]

I think this one help you....
just check this one... :)

Thanks..


这篇关于如何显示两个窗体之间的进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆