foreach(Control myControl in this.Controls)
{
//你也可以根据其他条件判断
if (myControl.Name == "ControlName")
this.Controls.Remove(myControl);
}

解决方案 »

  1.   

    参考这篇文章http://www.microsoft.com/china/msdn/library/dv_vstechart/html/vbtchCreatingControlArraysInVisualBasicNETVisualCNET.asp采用集合来存放控件,这样可以索引可以方面的添加和删除控件应该是个很不错的方法.
      

  2.   

    问题就是在一大堆控件中选的控件无法预知用户要删的控件是随机的mybutton
    和ControlName如上所诉如何取下。
      

  3.   

    System.Windows.Forms.MessageBox.Show("您已单击" +(string)(System.Windows.Forms.Button) sender).Tag);
    执行结果为“您已单击“   +(string)(System.Windows.Forms.Button) sender).Tag);无效为何