using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Threading; namespace ThreaddedApp { public partial class Form1 : Form { delegate void progressbarrunnerDelegate(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.Invoke(new progressbarrunnerDelegate(progressbarrunner)); } private void progressbarrunner() { for (int i = 0; i < 100; i++) { Thread.Sleep(50); this.progressBar1.Value = i; Application.DoEvents(); } } } }
Thursday, February 2, 2012
Progressbar Update In C#.net
Labels:
C#.net,
Delegates,
Progressbar,
Threads
Subscribe to:
Post Comments (Atom)
ProgressBar control for C#.NET
ReplyDelete