Easy Multithreaded Programming Using BackgroundWorker
- Posted: Jan 24, 2006 at 2:54 PM
- 33,305 Views
- 6 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- Mid Quality WMV (Lo-band, Mobile)
Here's a quote from
Chapter 6: Using Multiple Threads of the
Smart Client Architecture and Design Guide:
"To maximize the responsiveness of your smart client applications, you need to carefully consider how and when to use multiple threads. Threads can significantly improve the usability and performance of your application, but they require very careful consideration
when you determine how they will interact with the user interface."
.NET Framework 2.0 and the BackgroundWorker component to the rescue! Marc Schweigert, Federal Developer Evangelist, shows you how easy it is to build a responsive multithreaded Smart Client application with Windows Forms 2.0 & the BackgroundWorker component.
Resources:
Federal Developer Blog:
http://blogs.msdn.com/federaldev/
BackgroundWorker Component Overview:
http://msdn2.microsoft.com/en-us/library/8xs8549b.aspx
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Some may say that Channel 9 for them is all about "getting to know personalities at Microsoft". Well, I'll trade all of that for training.
This content is what Channel 9 offers me, and I thank you for it.
[6][A]
Although I know it would be easy to do, it would have been nice had the progress bar been used to show database load progress as well.
-Marc
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
for (int i = 1; i <= 10; i++)
{
if (backgroundWorker1.CancellationPending)
{
e.Cancel = true;
}
else
{
backgroundWorker1.ReportProgress(i * 10);
Thread.Sleep(1000);
}
}
}
I noticed that this video is no longer working on this site. Is there anyway you can get this video to be functional again?
thanks
Remove this comment
Remove this thread
close