I have a progress bar to show the status of the program loading songs into the library.
foreach (Song s in InitializeLibrary())
{
Library.Add
The way I have done this is by using a BackgroundWorker component.
Use it to load your songs on a background thread and report progress to the UI thread that will update your progress bar.
The background worker handles all of the messaging between threads for the reporting of progress.
This gets you the benefits of Multithreading without having to manage the threading yourself.
A good tutorial that will show how to use the progress reporting is here.
You need to set the Maximum property of the progress bar so that it can calculate percentages when you increment the Value:
var items = InitializeLibrary();
pBar.Maximum = items.Length;
foreach (Song s in items)
{
Library.AddSong(s);
pBar.Value++;
}