Thanks george1106

I tried your advice about the

thread t = new thread(new threadstart(fun ction));
t.IsBackground = true;
t.Start();

"IsBackgrou nd" is the right property name and it worked out great. As soon as i terminate the program, the thread terminates and disappears from the task manager....