Hi Adrian,
you should declare a thread in the scope of your class, so that
its members can access it an terminate/modify if necessary. The
Termination can be done inside a timer that also should catch
the ThreadAbort Exception. Simple try/catch directive.
Example:
public class SomeClass{
private Thread MyMemberVisibleThread;
private/public/protected void CreateMyThread(){
this.MyMemberVisibleThread = new Thread();
....
...
..
}
private void Timer5SecondsElapsedEventHandler(...){
try{
this.MyMemberVisibleThread.Abort();
//i am not sure whether it was abort() or terminate() to stop
the
//thread, check for the right method
}catch(Exception e1){
//Handle exception here
}
}
}
Regards
Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space:
http://kerem-g.spaces.live.com/
Latest Open-Source Projects:
http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."