The Progressbar class provides progress bar control functionality in the .NET framework. You need progress bars to display the progress of your application or background tasks.
There are only three members of the ProgressBar class you should know about. The Maximum, the Minimum, and the Value properties.
You create a progress bar control using ProgressBar constructor.
this.progressBar1 = new System.WinForms.ProgressBar();
//(progressBar1 = new progressBar();
After creating instance of a progress bar you set the range of the progress bar by using Minimum and Maximum properties of the ProgressBar.
progressBar1.Maximum = 200;
progressBar1.Manimum=0;
The Step property is used to set number of steps in a progress bar.
progressBar1.Step=20;
The Value property is used to set the current value of the status bar.
protected void timer1_Tick (object sender, System.EventArgs e)
{
if (progressBar1.Value >= 200 )
{
progressBar1.Value = 0;
}
return;
}
progressBar1.Value += 20;
}
There are only three members of the ProgressBar class you should know about. The Maximum, the Minimum, and the Value properties.
You create a progress bar control using ProgressBar constructor.
this.progressBar1 = new System.WinForms.ProgressBar();
//(progressBar1 = new progressBar();
After creating instance of a progress bar you set the range of the progress bar by using Minimum and Maximum properties of the ProgressBar.
progressBar1.Maximum = 200;
progressBar1.Manimum=0;
The Step property is used to set number of steps in a progress bar.
progressBar1.Step=20;
The Value property is used to set the current value of the status bar.
protected void timer1_Tick (object sender, System.EventArgs e)
{
if (progressBar1.Value >= 200 )
{
progressBar1.Value = 0;
}
return;
}
progressBar1.Value += 20;
}
'컴퓨터 > 언어,프로그래밍' 카테고리의 다른 글
[C# .NET] NotifyIcon, ContextMenuStrip 활용 (초간단ㅋ) (1) | 2012.09.18 |
---|---|
[C#] Tray Icon (트래이 아이콘)으로 만들기 (0) | 2012.09.17 |
[C#] 부모창에서 자식창으로 값 넘기는 방법(소스) (0) | 2012.09.17 |
[C#] 자식창에서 부모창으로 값 넘기는 방법(소스) (0) | 2012.09.17 |
Excel ODBC (1) | 2012.09.17 |