«« Next » « Previous
«« Next » « Previous

Link Details

Link 80142 thumbnail

By mswatcher
via mikedub.net
Submitted: May 09 / 07:09

Windows Forms applications sometimes need to execute a long-running or background activity, often on behalf of the user. Such tasks are often secondary, and should not prevent users from continuing on with their primary work, such as searching for data. In these cases, a Windows Forms application, which operates on a main or “UI” thread, will create a separate worker thread for the secondary code to execute on. The concept is simple, but until Windows Forms 2.0, required a fair degree of work to implement. Much of this work involves dealing with ensuring safe multithreading, which means avoiding writing code that directly manipulates controls on the UI thread from the worker thread. Of course, Windows Forms applications are visual applications and, when a long-running process is initiated by a user, they need to see progress and completion information, and should probably be able to cancel the activity at any stage.
  • 1
  • 0
  • 67
  • 10

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (0)