stevegray
4Penny.net
Points: 55509

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.

 

 

4Penny.net
Version: Unknown or N/A
Section: .NET Development
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3