المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Progress Bar



C# Programming
05-11-2009, 06:09 AM
Hi, I want to do my progress bar in to pop up progress bar. i mean when i load something i want to pop up progress bar while progressing only. how can i do that. i wrote the coding for static progress bar. i mean drag & drop progrss bar from tool in to my form. ProgressBar ProBar = new ProgressBar();

private void import(object sender, EventArgs e)
{
if (listView1.Items.Count == 0)
{
ImageList imageList = new ImageList();
imageList.ImageSize = new Size(100, 80);
imageList.ColorDepth = ColorDepth.Depth32Bit;
this.ProBar = new System.Windows.Forms.ProgressBar();
this.ProBar.TabIndex = 0;
this.ProBar.Maximum = dlg.FileNames.Length;
this.ProBar.Minimum = 1;
this.ProBar.Step = 1;

foreach (string path in dlg.FileNames)
{
FileInfo fileInfo = new FileInfo(path);
listView1.Items.Add(fileInfo.Name);
imageList.Images.Add(Bitmap.FromFile(path));
ProBar.PerformStep();
}

A S E L A