Monday, November 3, 2014

Timers Help


Ok so if I do the:



Await Task.Delay(1000)

it will wait one second before doing the next set of stuff?


If so, I want the progress bar to fill up over the time of that delay and then clear at the end, so the progress bar would fill up during that one second and then clear once the 1 second is reached.



In regards to waiting one second, my advice is to try it :-)


Since you are willing to try this you must have the correct Framework as stated in my first reply and if so look at a simple example which shows how to do some work (in this case copy files) keeping the app responsive using a BackGroundWorker which uses a ProgressBar to show progress. Doesn't matter what you are doing, using a BackGrounderWorker is what many programmers are comfortable with.


Copy files while keeping your application responsive


This example shows how to use methods specific to VS2012 or higher targeting Framework 4.5 +


Populate DataGridView via asynchronously methods in VS2012 or higher




Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.


No comments:

Post a Comment