将我的项目中的表单添加到另一个项目 [英] Add a Form that is in my Project to another Project

查看:114
本文介绍了将我的项目中的表单添加到另一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Project,其中有一个表单本身具有多个对象(控件).我想将此表单添加到另一个解决方案中的另一个项目中. 我该怎么做. 谢谢.

I have a Project in which there is a form that has several objects (controls) in itself. I want to add this form to another Project in another Solution. How to I can do this. Thanks.

推荐答案

您的意思是您的项目中有一个表单,并且想将其添加到其他解决方案中的另一个项目.如果是这种情况.


请按照以下步骤操作:

You mean you have an Form in your Project and you want to add it to another Project in some other Solution. If this is the case then.


Follow the steps:

  • 右键单击解决方案资源管理器中的项目
  • 选择添加->现有项
  • 在添加现有项"对话框中,浏览到要添加的"Form.cs".

它将连同其中的所有内容(包括designer.cs和资源文件)一起复制到本地解决方案项目"文件夹中.


注意:

It will be copied to your local Solution Project Folder with every thing in it (including designer.cs and resource files).


Notes:

  • 仅在添加了表单的".cs"文件后,您可能只会看到Form.cs而不是设计"视图.只需在代码编辑器中打开文件,Visual Studio就会在Designer中自动绘制用于设计支持的表单.

  • Just after adding the Form's ".cs" file you may only see the Form.cs not the Design view. Just open the File in code editor and the Visual Studio will automatically draw the Form in Designer for Design Support.

此操作会将文件添加为副本.他们将独立于原始表单的更改.如果要更改,请将其添加为链接. (在添加现有项"对话框中选择添加为链接")

This operation will add the Files as a Copy. They will be independent to the changes to the Original Form. If you want to have changes then add it as a Link. (Select Add as Link in the Add Existing Item Dialog Box)

这篇关于将我的项目中的表单添加到另一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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