private void button4_Click(object sender, EventArgs e) { System.Threading.Thread thread = new System.Threading.Thread( new System.Threading.ThreadStart(AdDepartmentNumber) ); thread.Start(); timer1.Enabled = true; timer1.Start(); } void AdDepartmentNumber() { try { //执行的内容 } catch (Exception ex) { //日志 } } private void timer1_Tick(object sender, EventArgs e) { //要执行的方法 }