c# winform 关闭窗体时同时结束线程实现思路 Thread th = new Thread(Excute); th.IsBackground = true;这样就解决问题了。 这个属性的意思就是把线程设置为后台线程。 然后关闭进程的同时,线程也会随之关闭。