Note: please don't kill the thread.. Do your searching with a BackgroundWorker with SupportsCancellation set to TRUE, and often during your search, check the _backgroundWorker.CancellationPendign property. If it is True, Return from DoWork.
This is the proper way to stop background operations. Killing threads is like using task manager End Process to quit your apps; it can leave things in a proper mess
|