View Code
1 private void Start_Click(object sender, EventArgs e) 2 { 3 Start.Text = "处理中。。"; 4 Start.Enabled = false; 5 LogTxt.AppendText("开始\r"); 6 Thread th = new Thread(ExportFile); 7 th.Start(); 8 //关闭窗体时退出。 9 th.IsBackground = true; 10 }