Im trying to upload some images using the Flickr.net API.The Images are uploaded but the User Interface freezes.I have inserted the code for uploading in a Background worker
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
foreach (var item in imagelist)
{
flickr.UploadPicture(item, Path.GetFileName(item), null, null, true, false, true);
}
MessageBox.Show("Success");
}
The flickr object is created earlier from another form and passed to this form. I call the worker with if(worker.IsBusy==false){backgroundWorker1.RunWorkerAsync();}
when a button is clicked.