111,094
社区成员




private void FlushControls(Control con)
{
foreach(Control c in this.Controls)
{
String type = c.GetType;
switch(type)
{
case "Textbox":
c.Clear();
break;
case "combobox":
c.Items.Clear();
break;
case "panel":
this.FlushControls(c);
break;
}
}
}
foreach(Control c in this.Controls)
{
c.Dispose(); //如果有Panel等窗口的话,恐怕还得将子控件一一 Dispose掉...
}
InitializeComponent();