thread = Convert.ToInt32(textBox4.Text.Trim().ToString(), 10);textBox4.Text为空,加个判断吧,判断textBox4.Text有字符没有,有的话再执行