如何将一个表单的控件复制到另一个表单

如何将一个表单的控件复制到另一个表单

问题描述:

如何将一个表单的控件复制到另一个表单?

how do i copy the controls of one form to another?

您需要遍历Forms控件集合,https://msdn.microsoft.com/en-us/library/ system.windows.forms.control.controls(v = vs.110).aspx [ ^ ]然后开始为新表单创建和添加新控件。



我建议您找到一种不同的方式来完成您的需要。
You would need to iterate through the Forms controls collection, https://msdn.microsoft.com/en-us/library/system.windows.forms.control.controls(v=vs.110).aspx[^] and then start creating and adding new controls to the new form.

I suggest you find a different way to accomplish what you need.