ഇതൊഴിവാക്കി പ്രധാന ഉള്ളടക്കത്തിലേക്ക് പോവുക

പോസ്റ്റുകള്‍

ഒക്‌ടോബർ, 2018 തൊട്ടുള്ള പോസ്റ്റുകൾ കാണിക്കുന്നു

How to use background worker with Progress Bar based on user state in C#

How to use background worker with Progress Bar based on user state in C# //Intializing New Progress Bar var NCPB = new NewCustomisedProgressBar(); //Creating new Background Worker  var bgworker = new BackgroundWorker(); //Setting Background Worker for reporting progress bgworker.WorkerReportsProgress = true; //Do The Main Work here in Background Thread bgworker.DoWork += delegate(object sender1, DoWorkEventArgs e1)   { //Write the working code here //Remember GUI Triggering codes cant be written inside this //for that use Report Progress Funtion //Here I am triggering gui 5 times to make change in progress bar value after each task completion //First Time GUI Trigger,setting progress bar value to 0 (sender1 as BackgroundWorker).ReportProgress(0, 0); //Do The First Quarter Work Here //Second Time GUI Trigger,setting progress bar value to 25 (sender1 as BackgroundWorker).ReportProgress(0, 1); //Do The Second Quarter Work Here //Third Time GUI Trigger,setting progress bar value to 50