views:

51

answers:

4

how to to implement multithreading where one thread updating UI and other one is reading the database record in windows application

Any guidelines really appreciated...

+3  A: 

Take a look at the BackgroundWorker

Mitch Wheat
Jinks! (more chars)
Sam Holder
+2  A: 

you should look at the BackgroundWorker.

This will allow you to start the database operations on a background thread, so that your UI is not locked and also to report progress back to the main thread so you can update the UI with the results.

Sam Holder
now that was funny. Both at exactly the same time!
Mitch Wheat
yeah it was. yours was slightly more compact, so +1 for you!
Sam Holder
+1  A: 

You already have your UI thread running. Hence create a thread/BackgroundWorker for the db operation.

Veer
A: 

The backgroundworker has some convenient functions to do work without blocking the UI while it's possible to update the UI. MSDN

PoweRoy