日期:2014-05-18  浏览次数:20852 次

winform 怎么获取窗体包含多少控件或窗体
C# code

ControlForm controlForm = new ControlForm();
CheekKuangForm cheek1KuangForm = new CheekKuangForm();
CheekKuangForm cheek2KuangForm = new CheekKuangForm();
CheekKuangForm cheek3KuangForm = new CheekKuangForm();
cheek1KuangForm.Show(controlForm);
cheek2KuangForm.Show(controlForm);
cheek3KuangForm.Show(controlForm);
//有办法能获取controlForm现在包含了多少个窗体??



------解决方案--------------------
探讨
按你的代码,controlForm没有包含任何窗体