如何将一个表单的控件复制到另一个表单 [英] How Do I Copy The Controls Of One Form To Another

查看:165
本文介绍了如何将一个表单的控件复制到另一个表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.


这篇关于如何将一个表单的控件复制到另一个表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆