DynDeveloper.com

DynDeveloper.com

Sign Up Now! Log In
sgray128 8/15/2013 3:04:26 PM

.NET Development - Calling a subroutine asynchronously and waiting for the response, part II

* This article, and all our great .NET Development documentation, Is available on the .NET Development menu

A couple of days ago, I wrote an article that showed how to run code asynchronously.

http://dyndeveloper.com/articleview.aspx?ArticleID=255

That worked as advertised, but I've since gotten the requirement to report to the user on the progress. That method won't work so well, so I developed some code using the BackgroundWorker class that does the trick.

Here's the requirement: Write a Windows form that calls a class, the class does some work that takes a while (in this case, integrating files into Dynamics). Report back to the main form periodically and allow the user to see the progress.

In our example we use a list box to report, because it's quick and easy.

 

 

Version: Unknown or N/A
Section: .NET Development