O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - Running concurrent nebula finders using a parallelized loop

Now, we are going to create the UI and write some code to use the NebulaFinder class and its encapsulated simplicity combined with the .NET Parallel Extensions:

  1. Stay in the project, BlobCounter.
  2. Open the Windows Form Form1 (frmNebulaFinder) in the form designer, add the following controls and components, and align them as shown in the following image:
    Time for action - Running concurrent nebula finders using a parallelized loop
    • One picturebox (picResultingBitmap) with its SizeMode property set to StretchImage
    • One button (butShowResults) with its Text property set to Show results
    • One button (butRunBatch) with its Text property set to Run batch
    • One BackgroundWorker ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required