如何使用进度条 [英] how to use progressbar
本文介绍了如何使用进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好.我想在C#中的GUI Form
中使用ProgessBar
.请给我示例代码
谢谢...
Hello. I want to use ProgessBar
in GUI Form
in C#. Please give me code with example
Thank you...
推荐答案
如果您有此类问题,Google会为您提供帮助.
http://support.microsoft.com/kb/323116 [
Google will help you out just fine if you have these kind of questions.
http://support.microsoft.com/kb/323116[^]
Good luck!
要使用进度条,还必须使用计时器控件.
在属性框中启用计时器,并将代码写为:
For using progress bar u have to use a timer control also .
Enable timer in property box and writ code as:
private void timer1_Tick(object sender, EventArgs e)
{
int d;
for (d = 0; d<= 100; d++)
progressBar1.Value = d;
this.Visible = false;
Login l = new Login(); // Show whatever you want
l.Show();
timer1.Enabled = false; //Disable timer
}
对于进度条,将其值初始化为100
And for progress bar , initialize value of it to 100
这篇关于如何使用进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文