backgroundWorker and connection to remote db Progress in WinForms
===

I wish I could represent graphically connecting to my remote database, since it is not possible to know the exact connection duration, I thought that an endless progress control should do the job. Currently I am using WaitCursor which doesn't give me satisfaction.

When I use controls such as Progressbar, When I click to begin connection the progress is stopped since it is not used in a separate tread, so I tried to use the backgroundWorker, but have no idea on how to use it to database connection purpose.

I made some searches and found [here][1] a beginning of the solution, but there the max value of the progressBar is fixed, and I am a little confused.

Please help ...


  [1]: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/9b3aef3e-b698-4aa9-a1d8-50fe2cf24927/