在代碼裡,改變空間的背景色this.TextBox2.BackColor=red; 是不是需要名稱空間啊?[解决办法]this.TextBox2.BackColor = System.Drawing.Color.Red;