vb.net writing background multithreading
My application wil开发者_开发百科l creates an Excel from DB, creating an excel file takes few minutes of time and till that time the user dont want to wait for the excel to complete, he should start working with the application. Once the excel have been completed the appilcation should po-up message saying, 'Report Sucess'.
can any one tell me how to do this, whtr background thread will help me in this ?
if yes pls provide me some sample, newbie to threading....
It depends what you do during the Excel creation.
A very simple and effective way to create and control a background thread is using a BackgroundWorker.
It very easy to implement.
And it's thread safe
You can find a working example I've prepared (BackgroundWorkerDoStuff).
精彩评论