private void button3_Click(object sender, EventArgs e) { this.button2.Enabled = true; if (LTB != null) { int length = LTB.Count(); for (int i = 0; i < length; i++) { this.Controls.Remove(LTB[i]); } LTB = null; } }
private void button2_Click(object sender, EventArgs e) { int i, length; button1.Enabled = true; button3.Enabled = true; length = LTB.Count(); for (i = 0; i < length; i++) { this.Controls.Remove(LTB[i]); } length = LTB1.Count(); for (i = 0; i < length; i++) { this.Controls.Remove(LTB1[i]); } length = LTB2.Count(); for (i = 0; i < length; i++) { this.Controls.Remove(LTB2[i]); } }